Thursday, September 7, 2017

windows 7 - how to move folders and sub folders content only and preserving the folder hierarchy



How to move folders and sub folders content only and preserving the folder hierarchy, what I mean I need to move only the files in all folders and subfolders while preserving the same folder structures and hierarchy.


Answer



@Vembutech you inspire me .. I remembered some of my old DOS experience and found another solution using xcopy.
so it will be easy doing a batch file moving all folders tree and its content and run the batch backward to to copy only the tree only. using the following command line



xcopy Source [Destination] [/t] [/e]



/t : Copies the subdirectory structure (that is, the tree) only, not files. To copy empty directories, you must include the /e command-line option.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...