On one hard drive, I have a library of movie files in a single folder, and on another "backup" hard drive, I have the same files only sorted into different folders and subfolders (e.g. by country, director, etc.). The purpose of this setup is not important, but I'll add that the single-folder drive is used for torrenting.

If my backup drive with multiple folders and subfolders fails, I want to be able to automatically restore the files from the single-folder drive into their multi-folder structures.

Note that this isn't a job for backup/recovery software, as I'm not interested in saving a backup of all the files. Nor is it a job that would involve simply copying the file directories to text/CSV file, or copying them as empty folders.

Basically, the thing being saved would act like a configuration file telling the OS into which folders/subfolders to place a list of files.

UPDATE: The original question is obsolete (for me) because the practice of maintaining one messy, single-folder drive and another organized, multi-folder drive (with the same files) as back-up is impractical and can be accomplished differently using symbolic links or hard links. Basically, these links allow us to have the same files located in different folders of a hard drive without taking up double the space, as would happen if we made copies of them. So, for example, we can have the files in a single folder (for seeding purposes) as well as organized in multiple folders on the same HDD. Thus, in contrast to the situation of having files organized differently across two hard drives, we can maintain a real backup of the hard drive without having to recreate the folder structures if one drive fails. Google these terms (symbolic and hard links) for more info.

  • Umm there are lots of ways to do this, and I'd usually recommend robocopy but frankly, XCOPY does this easily. XCOPY /? will show: "/T Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories." If you want to copy the files including empty subfolders, just be sure to add /E to the XCOPY options you choose for the copy operation. – Debra Feb 19 '19 at 6:33
  • Thanks for suggesting XCOPY. The main challenge however is not copying the folder structures but rather automatically relocating files (from a single folder) into their original folders. If this can be done, I welcome you to submit an answer. – AlexR Feb 19 '19 at 17:03

So, your current "backup" drive is where you also originally save these downloaded files, and you're just looking for a way to move these back into a second drive which has some structure you'd like to preserve, in the situation where the drive with the structure fails.

I can see how this differs from traditional backup, however I'm also rather certain that such a utility doesn't exist.

You could write a script which retrieves all of the file names and the folders they currently exist in, and store this record in another file, perhaps a CSV. Then write another script which finds the files listed in the stored reference table in the download directory, and copies them to the target directory. Neither of these scripts would be particularly complex.

| improve this answer | |
  • Yes, exactly, the idea is to save the current file+folder structure as a reference (script) and have another script execute the copying of the files into folders based on the reference, although I thought there might be a program that can do that. – AlexR Feb 19 '19 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.