How can I create multiple, numbered copies of a file in Windows?
Solution 1:
Some batch-fu. Replace "source-file.html" with your source filename. This'll do your leading zeros, too. Save this as a .BAT or .CMD and let 'er rip.
@echo off
for /L %%i IN (1,1,100) do call :docopy %%i
goto :EOF
:docopy
set FN=00%1
set FN=%FN:~-3%
copy source-file.html poll%FN%.html
Edit:
To solve a less general case in the sprit of sysadmin1138's answer:
@echo off
for /L %%i IN (1,1,9) do copy source-file.html poll00%%i.html
for /L %%i IN (10,1,99) do copy source-file.html poll0%%i.html
copy source-file.html poll100.html
Solution 2:
The following powershell one-liner should do the trick:
2..100 | %{cp poll001.html ("poll{0:D3}.html" -f $_)}