Backup for File NAMES (Not the actual files) - Can anyone help me on this strange request :)

Hi OzB Computer Crew,

Just thought I would put a question out there in case there is an easy solution.

The background is that I have many series, movies and music downloaded through various legal channels (like on Ozbargain when a deal is posted to mp3's etc)

I don't want to backup the actual files (others I certainly do) I just want to make a backup of the actual file names so it can prompt my memory and I would seek the files again should I have a HDD fail.

Now I do know of command line prompt scripts that I can run to list a drives contents, and I have used simple little programs in the past to list directory file names.

What I am after is an automated way of having this happen say once a week , or upon computer turn on that writes a file automatically to a drive that is synced/backed up (I recommend and use sugarsync for sync and backup)

Any ideas? Any help or hints would be greatly appreciated!

EDIT: PC - Windows 7 OS (Sorry)

My Solution:
Ok, with some ideas on here and some searching, I solved the problem for my purpose scheduling a full directory listing of two drives D & E.
Here is what I did;

  1. Create a folder in my E:\ called 'FileListBackup' which is synced to sugarsync (backed up to cloud)
    This is where the text file will always write to.

  2. Open Notepad and copy in this text;
    dir /a /b /-p /o:gen /s > E:\FileListBackup\Latest_E_Drive.txt
    start notepad E:\FileListBackup\Latest_E_Drive.txt

  3. Save this text as 'File List Maker E.bat' and place in the root directory of E:

  4. Make a copy of this file to root directory of my D: and edit the new file slightly (only changed the two drive letters);
    dir /a /b /-p /o:gen /s > E:\FileListBackup\Latest_D_Drive.txt
    start notepad E:\FileListBackup\Latest_D_Drive.txt

  5. Start > Programs > Accessories > System Tools > Task Scheduler (easy to set up with batch files)
    or
    Copy shortcuts of your batch files into Start > Programs > Startup (This will run the program every startup)

A couple of notes;
This code will overwrite the file each time the computer starts or runs the task as a schedule - this may not be ideal if you don't use cloud backup.
Try this code on the third line to make a new file each time (credit to expertreader);
rename E:\FileListBackup\Latest_X_Drive.txt Archive_%date:~-4,4%%date:~-10,2%%date:~-7,2%_%hr%%time:~3,2%%time:~6,2%.txt

You may want to remove the 'start notepad' line. I put it in to remind me its still working each time.

Spaces and '-' other characters like this will not be allowed.

Thanks to all who contributed and gave me ideas!

Comments

  • me too. need backup of xbox 360 iso that i have downloaded

  • What operating system do you use? If Linux/Mac OS X/other NIX system, you could make a cron job for a ls piped to a text file (or similar) very easily. If on Windows, I'm sure there is a way to schedule a task or batch file, and I'm assuming you can similarly pipe the output of dir to a text file.

    • +1

      You can do it the same way on Windows using Cygwin also.

    • Yeah, what OS? In Windows you can schedule a task. Lots of howtos out there.

    • Yes apologies - OP updated. I use Win 7.

  • +2

    here is what I have and it works for me….create a new text file and paste below text and save it as .bat file….
    you need to set your required path in line 3- CD\Users\Dell-User\Downloads…. leave the CD part as is and change the directory path to the folder that you want to create file name for…..
    change line 4 path to whereever you want the text file to be saved…..
    change line 5 path to same as line 4 path….

    there are only 5 lines in the code but due to limited width of the webpage it has split the line 5.

    after you create the batchfile…use the windows task scheduler in the control panel to set it to run once a week….

    the output of the file looks like this - Archive_20142005_093629.txt

    the first numbers after underscore represent todays date(yyyyddmm) and second set of number time(hhmmss)…..feel free to modify this to suit your requirement/preference…..

    set hr=%time:~0,2%
    if "%hr:~0,1%" equ " " set hr=0%hr:~1,1%
    CD\Users\Dell-User\Downloads
    dir > c:\Users\Dell-User\Downloads\mydocuments.txt
    rename c:\Users\Dell-User\Downloads\mydocuments.txt Archive_%date:~-4,4%%date:~-10,2%%date:~-7,2%_%hr%%time:~3,2%%time:~6,2%.txt

    • Hi Expert, this looks to be exactly what I am after. I will play around and see if I can make it work tonight. Thank you very much.

      • I have updated my original post with how I got it all to work for me! Cheers.

  • I use this program for a similar purpose. The interface is clunky but lots of options. You can also set filters so it will only list out certain file types:
    http://www.softpedia.com/get/System/File-Management/Karen-Di…

    • Cool, thanks for the idea, I have used similar programs in the past. Can you schedule using this one?

      • I've never thought to try and use it as a recurring thing.. I'm sure it would be possible, even if you set it up as a windows scheduled task

  • I need the same thing. I did file a program a while ago but it had to be manually ran and I would just forget to do it.

    Something that is scheduled would be perfect.

  • Shouldn't you be backing up this names file on external drive or on cloud? If you back up on the same drive, how can you retrieve it in case of HDD fail?

    • Yes indeed, see my point #1. The folder I have made is synced every time the computer is turned on and keeps version history when files are overwritten.
      I only sync important files like photos and documents. Movies and mp3's are now kept on a text listing in the same area I keep the important stuff but I think its silly paying for cloud storage for music and movies (just my opinion)

  • +1

    Have you doing this with powershell?

    Get-ChildItem E: -Recurse | Export-Csv E:\FileListBackup\E_Drive.csv
    Get-ChildItem D: -Recurse | Export-Csv E:\FileListBackup\D_Drive.csv

    save as e:\FileListBackup\Filenamebackup.ps1 in an accessible location and then use task scheduler to execute the script once a week or whenever you want

    you should be able to call the powershell script using the following command

    powershell.exe e:\FileListBackup\Filenamebackup.ps1

  • Not sure if this is the easiest way, but this is how I do it

    Open CMD
    Use the command. tree "E:/movies" /F

    Here's some more info
    http://www.csulb.edu/~murdock/tree.html

  • Powershell is the easier way.

  • dir > file.txt

Login or Join to leave a comment