Is there any easy way to move the contents of a folder, but leave the folder

tel0004

Limp Gawd
Joined
Jan 26, 2007
Messages
499
I'm dowloading some roms (I have around 2k). THey came zipped up, so I unzipped them, but I now have 2k folders, when the program I'm using to run the roms needs them the files all in the same folder. I would rather not spend a few hours opening a folder, dragging the file into a different folder, then repeating that process 2k times.

Is there any easy way to get the files into one folder, and leave the empty folders behind.

I'm running Vista, btw.
 
The easiest way involves going back a step. Use something like WinZip and choose the option to "extract to here". Then, everything you extract will be in the same folder. I'm making an assumption here, that you are using the built-in zip utility. That's fine in a pinch, but if you are working with that many files, you need a full-fledged app.
 
Yup do as DeaconFrost said and back up a step. Take all 2K folders still in the zip format, highlight them and use something like winrar to extract to the folder where you want all the files. You could also move all the zip folders into the folder where you want the files and use the extract here option.

That way would be the easiest, other wise I think you'll need a script

http://www.techimo.com/forum/t177485.html
 
Just do a search in the directory for the right file type, take all the files and move them into the directory you want them in. No need for a script.
 
Here's batch file to do the trick. If you run it and it doesn't remove the directory, it means that there are files in that sub directory.

Also, make sure you run this in the directory you have all the sub directories in. It could be baaaaaaad to run this in the wrong spot.

Code:
:Init
  @Echo Off
  Cls

:Main

  Echo This script will move the contents of all subdirectories into 
  Echo the current directory.
  Pause

:MoveFiles
  Echo.
  Echo.
  Echo Moving Files
  For /d %%d in (*.*) do (
    Echo -------------------------------------------------------------------------------
    Echo [%date%:%time%] Working on Directory: %%d 
      Move .\%%d\*.* .
      Rd %%d /q
    Echo [%date%:%time%] Directory Compllete
    Echo -------------------------------------------------------------------------------
   )
 
Just do a search in the directory for the right file type, take all the files and move them into the directory you want them in. No need for a script.

Thanks. That was very easy. The only problem I ran into was that two different file types had the same extension, but I just moved it to a second hard drive, and searched only that one.

I'm amazed at how easy that was.

Thanks again.
 
Back
Top