NokiMo
dramaotaku
dramaotaku

patreon


amrayu's File Archiving System - How to find files quickly

If you're a lifelong Japanese entertainment media hoarder like myself, you have gone through countless laptops, desktops, hard drives, DVDs, CDs, etc. Usually when I get a new laptop, I transfer all of my old data onto a hard drive. Hopefully you've done that too! I am not super organized by any means, but how do you keep track of all the files you've downloaded, transferred, and copied? Your files must be split across multiple drives and there's no simple way to search for files unless you do one of the following:

1. Manually type out all the files you have onto some document or take screenshots of the files you have and search that way?

2. Look for one of your many drives, hook it up to your computer, and search using MacOS Finder or Windows Explorer.

I have no patience for any of that, so I've developed a File Archiving System for myself and I've been using it for the past few years. It has cut down the amount of time maintaining,  organizing and looking for files.

Please note that I'm on MacOS, so the Unix commands may differ for Windows.

1. Attach the external hard drive that you want to archive.

2. Open up Terminal (MacOS) or Command (cmd.exe for Windows).

3. Type in 'pwd' (without the quotes to find the location of where you're at) and hit enter.

4. You will need to navigate to your hard drive. You can use a combination of 'ls' to list out files in a directory or use 'cd ..' to go up one directory. Here's what it looks like below when using 'pwd' and 'ls'. Remember to always hit enter after you type in a command. I've blocked out some folders for privacy.

5. For me, I have to get to 'Volumes/WD-4TB-Red' which is the location of my external hard drive. The command to directly go to my drive is 'cd Volumes/WD-4TB-Red' then hit enter.

6. Now type in the command to find all files and print their filepaths to a .txt file. 'find . -type f > WD-4TB-Red.txt'

7. You may get a permission denied. In that case, change your user to admin by typing in 'sudo su' and hit enter.

8. Type in your computer's password at the prompt.

9. We will repeat step 6 and type in the command 'find . -type f > WD-4TB-Red.txt'

10. The Terminal is now hard at work gathering all the filepaths and printing it to a txt file. In my case, the file will be printed to WD-4TB-Red.txt. I name the file this way to match the actual external hard drive. You'll see why it's named this way when we'll need to search for files.

11. Wait until the Terminal is done. The Terminal will blink on a separate line beneath your command.

12. Once the Terminal is done, you'll find a WD-4TB-Red.txt in the root of your external hard drive.

13. Open the .txt file and check that everything is printed correctly. Here's a snapshot of the .txt file I just created. You can see the various file paths and the files.

14. Now, copy this .txt file out and save into a folder on your computer so you can easily access it. My folder is named "FileArchive".

15. You can repeat steps 1-14 above and gather all the txt files like I've done below. Each .txt file represents a separate external hard drive that I own.

13. Now, for the fun part! Let's search our .txt files for a Japanese drama. Open up MacOS Terminal or Windows Command Prompt and change to the directory of where the txt files are located. Mine are in 'Documents/FileArchive'.

14. Let's search for Majo no Jouken (aka. Forbidden Love) starring Matsushima Nanako and Takizawa Hideaki. Type in the following command: grep -ir 'forbidden'  (please include the single quotes).

Since we're searching for file names, try to be somewhat vague and not too specific.

15. We've found some files named forbidden! You can see from the screencap below that the .txt filename shows in our search, followed by the path from that specific .txt file. Using the path and .txt filename you can find your file easily.

And that's it!

You can repeat steps 14-15 quickly whenever you need to find something or just verify that you have the file already.

If you're still filling up your hard drives, it's a good idea to create a new .txt file and replace the older one in your "FileArchive" folder.

Another tip: You can use this method to organize your files by piece-mealing all the different drives and moving them to one central location later on.

Now you never need to maintain an external document to archive your dramas!

Hopefully this information is useful. :)


Related Creators