Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
|
Lista Forumurilor Pe Tematici
|
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login
POZE MRRRR'S FORUM (VIEW ONLY)
Nu sunteti logat.
|
Nou pe simpatie: erica_ana_maria pe Simpatie
 | Femeie 22 ani Bucuresti cauta Barbat 27 - 67 ani |
|
Mrrrr
AdMiN
 Inregistrat: acum 18 ani
Postari: 2251
|
|
Hello, I have 1 file that I need to make 1000 copies of.
But I wanted it copied and renamed like this:
1Filename.txt 2Filename.txt 3Filename.txt
Etc. up to 1000.
It's pretty easy to make 1000 copies of the same file, but it messes up how it is named.
They end up looking like this: Copy 1 of Filename.txt, Copy 2 of Filename.txt, etc.
Does anyone know a way to do this? |
Use an iterative variable to set the starting value (start#) and then step through a set range of values until the value exceeds the set ending value (end#). /L will execute the iterative by comparing start# with end#. If start# is less than end# the command will execute. When the iterative variable exceeds end# the command shell exists the loop. You can also use a negative step# to step through a range in decreasing values. For example, (1,1,5) generates the sequence 1 2 3 4 5 and (5,-1,1) generates the sequence (5 4 3 2 1)). The syntax is: for /L {%% ¦ %} variable in (start#,step#,end#) do command[CommandLineOptions]
Therefore ...
C:\>for /L %f in (18502,1,18560) do copy C:\Temp\18502Filename.txt C:\Temp\%fFilename.txt
The line above goes 18502Filename.txt 18503Filename.txt 18504Filename.txt and so on |
Source:
_______________________________________

|
|
pus acum 7 ani |
|