.bat File Help Needed :)


Steve-O

Well-Known Member
Joined
Aug 28, 2003
Messages
4,054
I have been writing simple Bat files to make tasks easier for my self but I just cant get this one to work.

Right, I have a folders like this (just an example) -

\southpark\series1\episode1\ep1.avi
\southpark\series1\episode2\ep2.avi
etc etc

What I want is a bat file that I can put in folder \series1\ and it will move all the avi files to another folder eg C:\southpark

So far I have got this to work -

Move episode1\*.avi C:\southpark

but When I goto change episode1 to * to make it look like -

Move *\*.avi C:\southpark

to try and move all the .avi files at once from all the episode folders it wont work.

anyone got any ideas?? Manually doing it is not an option as it will take ages :p

thanks
 
How about:

for /d %a in (*.*) do move %a\*.avi c:\southpark

This will do one level deep (ie, all episodes in a series directory). I'm sure you can think of a replacement for multiple levels :)
 
Squidge said:
How about:

for /d %a in (*.*) do move %a\*.avi c:\southpark

This will do one level deep (ie, all episodes in a series directory). I'm sure you can think of a replacement for multiple levels :)
Thanks for the help will give that a go sometime but I was just reminded about the good old windows search feature (Right click folder click search type .avi in and away it goes) :)
 
Last edited by a moderator:
Back
Top