I'm a complete newb when it comes to batch
programming and am struggling to do
something that's probably very simple...I have a load of files in a set file structure and I
want to copy out the contents of certain sub-
folders into another folder. The file structure
looks something like this:c:\myimages\producta\bigimages\
c:\myimages\producta\smallimages\
c:\myimages\productb\bigimages\
c:\myimages\productb\smallimages\etc
What I want to do is copy everything from:
c:\myimages\*\bigimages\
to:
c:\allthebigimages\
but as I can't seem to use wildcards in paths I
figured I need to do a loop - at which point I get
stuck.So how do I write a batch that loops through
all the 'product' folders and copies everything
from the 'bigimages' sub-folder?Thanks!
John
for /d %%a in ("c:\myimages\*") do @copy "%%~Fa\bigimages\*" "c:\allthebigimages\" 2>NUL
That appears to work. Fantastic! Many thanks!!!
