0

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.

2 Answers 2

1

You can move the files available in the folders and sub folders without losings your current folder hierarchy in the source location, but the destination location will not have the same folder hierarchy if you move the data. If you do copy, paste and delete you can preserve your folder hierarchy in destination location also.

Steps for move (without having folder hierarchy in destination location)

  1. Go to the source location.

Example: "D:\Folder\Source_location"

  1. Search in that folder with *.*

  2. Select all the files without folder and move it to the destination location.

This way you can move the files from one location to another location without losing the folder hierarchy in source location.

Steps for copy and delete (with the same folder hierarchy in destination location also)

  1. Go to the source location.

Example: "D:\Folder\Source_location"

  1. Copy the folder Source_location and paste it to destination location.

  2. Again go to source location

  3. Search in that folder with *.*

  4. Delete all the listed files.

In this way you can preserve your folder hierarchy in both source and destination location.

0

@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.

2
  • In your question, you are also talking about moving the files. This solution, using /t does not do that. Is your question or your answer wrong?
    – LPChip
    Commented Dec 4, 2014 at 22:36
  • actually the two answers lead to the same result. my answer is just enriching the subject. thanks to @vembutech. what I need is "Moving/copying" the files and folders with the same folder tree structure and after the moving I want to keep the same folder tree structure empty in my source location.
    – hsawires
    Commented Dec 5, 2014 at 7:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .