Solved Generating files with name based on list of names

May 12, 2012 at 18:26:53
Specs: Windows 7
I would like to ask for help with this:

I have 1 image file (default.jpg) and I need to change its name into cca. 500 different versions based on content in another file (names.txt). With each entry in names.txt a new copy of default.jpg is created.

Names.txt would be like this:
Filename1
Filename2
Filename3

and copies of default.jpg called Filename1.jpg, Filename2.jpg, Filename3.jpg are created

You could really save me a lot of time, because otherwise I would have to do this manually for 500 files.

Thank you in advance


See More: Generating files with name based on list of names

Report •


#1
May 13, 2012 at 08:20:52

Report •

#2
May 15, 2012 at 07:57:46
✔ Best Answer
@echo off
for /f "tokens=*" %%i in (
names.txt
) do (
copy default.jpg %%i.cca
)

Tony


Report •
Related Solutions


Ask Question