Windows - How to move all files in subfolders to a parent folder?

  1. Make a selection of the files and folders you want to move.
  2. Right click, choose cut
  3. Go to the parent folder
  4. Right Click on some empty space and choose paste.

If the subfolder in question has multiple subfolders and you want to move all the files without their subfolder structure in tact, do the following:

  1. Press F3 to open the search dialog (or if you have Windows 7+ it will move the cursor to the search bar)
  2. Type in *.* and press enter.
  3. Wait for the search to complete. Note that it can appear to be done and then suddenly it finds more files. There is no notification when the search is complete other than a bar saying: Search again in, which appears at the bottom of the search results.
  4. Select all files using Ctrl + A
  5. Right click, choose cut
  6. Move to the parent folder by first pressing back to exit the search and then another time to go to the parent folder
  7. Right click an empty place and choose paste.

Use the 'for' command: open a command window, then use something like the following, assuming you have files in c:\foo\bar\ and want to move them to c:\foo\ :

for %F in (c:\foo\bar\*.*) do move /Y %F c:\foo

The /Y switch turns off confirmation; remove it if you want to confirm each file move.

edit: if you want to save this into a batch file and run it from the parent folder, you can, but you need to double-up the percent signs (i.e. %F becomes %%F)


From a command prompt:

Move c:\parentFolder\subFolder\*.* c:\parentFolder

Tags:

Windows