Re: Need a script to rename a file 1600 times
- From: "Arnaud Petitjean [MVP]" <apetitje[pasdepub]@hotmail.com>
- Date: Thu, 13 Dec 2007 09:15:00 +0100
Hello !
In Powershell you can write this :
1..1600 | foreach {cp c:\temp\test.pdf -dest c:\temp\test$_.pdf}
Best regards from France,
Arnaud PETITJEAN
MVP PowerShell
http://www.powershell-scripting.com
"Pegasus (MVP)" <I.can@xxxxxxx> a écrit dans le message de news:er1EgXDPIHA.3532@xxxxxxxxxxxxxxxxxxxxxxx
"Paco73" <Paco73@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:13289EBE-35BA-4EBB-A984-12CA4089869A@xxxxxxxxxxxxxxxxI know this is a strange request, but I am looking for the best way to take a
PDF file and copy it 1600 times and rename it each time.
Example:
I have been asked to take C:\Temp\Test.pdf and make 1600 copies to
C:\Temp\PDF\Test1.pdf, Test2.pdf, ... Test1600.pdf.
I am a scripting noobie, have only really modified other scripts to fit what
I need, and am not real sure how to handle this request.
Thanks you in advance for your responses.
--
Thanks,
Paco
A simple command line will do:
for /L %a in (1,1,1600) do @copy c:\My.pdf /b /y c:\temp\PDF\test%a.pdf
.
- References:
- Re: Need a script to rename a file 1600 times
- From: Pegasus \(MVP\)
- Re: Need a script to rename a file 1600 times
- Prev by Date: Re: Moving a random file from the server to workstation
- Next by Date: GetObject Error Checking
- Previous by thread: Re: Need a script to rename a file 1600 times
- Next by thread: Re: List Group Memberships for users in a group
- Index(es):