Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a complex folder structure similar to:


Except with probably hundreds of folders and a depth of around 4.

I want to run a command that will move all the files from every sub folder into the top level folder. So something like h:\folder1\*\*.* to h:\folder1.

Is there a tool I can use to do this? Does Windows 7 have a command that will do this?

share|improve this question
Are you OK with doing some scripting on your own? This could easily be solved using Python or Bash scripting. – Tomas Lycken Apr 16 '12 at 9:51
Yes I could... python might be an idea. do you have any ideas of where i would start searching for answers on how to create the python script? i assume bash won't run in windows given that it is a linux thing yes? – Jason Apr 16 '12 at 9:52
(...and when I say Bash, I of course mean the Windows command line... But a .bat file is very much like a Bash script anyway...) – Tomas Lycken Apr 16 '12 at 9:52
oh right... i didn't realise. So what type of bat file script do you suggest? how would i capture all files under folders? – Jason Apr 16 '12 at 9:53
Found this :… – Jason Apr 16 '12 at 9:54
up vote 7 down vote accepted

There is a way to move all files

  1. Goto the parent folder
  2. Click on Search box
  3. Type *.* and Wait
  4. You will see all files and folders
  5. Select all files except folders
  6. Perform Cut operation (CTRL+X)
  7. Goto to the parent folder
  8. Perform Paste operation (CTRL+V)

Now files moved to parent folder

share|improve this answer
Interesting use of Windows Search ;) – Bob Apr 16 '12 at 11:25

Found the answer here: Move files from multiple folders all into parent directory with command prompt .

A guy has made a command line program that works a treat within win 7, no need for extra things to install.

h:\Downloads\MoveFilesUpFromSubfolders.exe -t .

You just run that in the parent folder (h:\folder1) for me and then it does a test. if the test looks okay then you execute the command

h:\Downloads\MoveFilesUpFromSubfolders.exe .

Bam! after a couple minutes it's all done and you can delete all your folders.

Thank you guy!

share|improve this answer

You must log in to answer this question.

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