How to duplicate one file into 500 files

October 12, 2010 at 01:46:54
Specs: Windows XP
Hi,
I have one jpg file named 1.jpg
and would like 500 copies of that one named automatically
2.jpg
3.jpg
4.jpg
and so on
I have both XP and Mac OS X
Any help welcome!

See More: How to duplicate one file into 500 files

Report •


#1
October 12, 2010 at 02:03:27
I dunno Mac, but in XP:

=====================================
@echo off & setLocal EnableDELAYedeXpansion

for /L %%a in (2 1 500) do (
copy 1.jpg %%a.jpg
)


=====================================
Helping others achieve escape felicity

M2


Report •

#2
October 12, 2010 at 02:13:31
vouah mechanix2go, I am impressed !!!
many thanks!!!
so I put that code in .bat file and type it and that's it?
perfect ...

I try to understand the code (as I am an old basic, cobol programmer :)

so echo off is to not having the display done during the exec I think

the for is the loop

/L = ?

%%a is the variable

in (2 1 500) that should tell to go from 2 with steps of 1 until 500

and the copy just copy the initial file into the new one composed by the variable and the jpg extension

will try it now :)

many thanks for being so quick and precise


Report •

#3
October 12, 2010 at 02:26:24
and it works so well!

you made my day thanks :)

the numbers 2 1 500 are exactly what I said (did some tests to verify)


Report •

Related Solutions

#4
October 12, 2010 at 02:33:34
and here more about the FOR and /L option

http://www.suite101.com/content/bat...


Report •

#5
October 12, 2010 at 03:08:01
"I try to understand the code (as I am an old basic, cobol programmer :)"

What, no FORTRAN? SHEESH


=====================================
Helping others achieve escape felicity

M2


Report •


Ask Question