Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

move files out of folders to a new folder

This script is so freaking awesome and so dangerous at the same time it is not funny.

It searches the folder recursively for files with the wildcard.extension when found it moves them to the supplied folder at the end.


- Destination folder needs the trailing \ otherwise all files are move the the "file" movies endlessly overwriting it. just lovely.
- Can only run in windows cmd in the directory that has the root movies folder. Running anywhere else is crazy.

for /r %f in ( "*.mp4" ) do move /y "%f" "c:\movies\"

Yes the code could be modified for a bat version but i feel it is slightly safer this way.


- Its fast. Once you go past 10 files working out this script will be faster in the long run
- Can move files between hdd's, will be slower as it will have to actually write data, rather than the location of the file.
- Can be changed to suit your file type or needs, maybe you need to move all the files with "game*2014.png" it will take it.

I would make a backup of files you are moving first until you are sure of the scripts use.
Sign In or Register to comment.