- Apr 23, 2003
- 6,404
- 0
- 76
Short and sweet, I need a batch file to do something kind of weird. I need it to go through a folder (and its subdirectories), and for each file of extension ".foo" I need it to place a copy of a separate file in the folder with the same name as the first file, but with the extension ".fop". To put it into an example, say I have a folder with these files:
thing.foo
whatever.foo
yup.foo
I want the batch file to look at those files, then copy ANOTHER file into that folder and rename it for each file, so I wind up with:
thing.foo
thing.fop
whatever.foo
whatever.fop
yup.foo
yup.fop
All the ".fop" files being copies of one specific file.
Any way of doing this in a batch? I've sort of tried with what batch syntax I know, but I'm getting nowhere.
thing.foo
whatever.foo
yup.foo
I want the batch file to look at those files, then copy ANOTHER file into that folder and rename it for each file, so I wind up with:
thing.foo
thing.fop
whatever.foo
whatever.fop
yup.foo
yup.fop
All the ".fop" files being copies of one specific file.
Any way of doing this in a batch? I've sort of tried with what batch syntax I know, but I'm getting nowhere.