Thursday 22 September 2022
Thursday, September 22, 2022

Delete and archive files preserving the folder tree structure

 

Suppose you have a complex, deeply nested, structure of folders and files. This would be normal when you have a number of clients and need to keep their files. You would have often faced a situation to weed-out old files or folders from them, but keep an archive of those removed files before destroying. It would be nice if you could maintain the folder tree structure for those removed files, so that it would be easy to refer or restore when in need.

Let us see how we can do that in a simple way. 

  1. Right-click on recycle bin and take properties. Ensure the settings that files deleted are moved to recycle bin and not deleted directly. Also ensure that sufficient space has been allotted to recycle bin upto the size of the files that are going to be deleted.
  2. Clear the recycle bin; we need to use that as a temporary storage.
  3. Our root folder is named as My_Main_Folder.
  4. Now, simply delete whatever files or folders you need to remove.
  5. When finished, rename the root folder to My_Folder_to_Retain. This is the folder you need to retain after removing all unwanted files.
  6. Now open recycle bin, select all, and restore them.
  7. Go back to the original location, and you will find My_Main_Folder back.
  8. Rename that to My_Files_to_Archive. This is the folder you need to archive.
  9. Open that and you can see that all the deleted files are arranged in the original tree structure.
  10. To top-up you can add an index of the archiving files, using the TREE command.

0 comments:

Post a Comment

 
Back to top!