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:
alexxandra pe Simpatie.ro
Femeie
24 ani
Timis
cauta Barbat
24 - 57 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [WINDOWS] Make multiple copies of the same file Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
Mrrrr
AdMiN

Inregistrat: acum 17 ani
Postari: 2189

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 6 ani
   
Pagini: 1  

Mergi la