Batch Copy Files

/ Published in: DOS Batch
Save to your folder(s)

Script makes a copy of "file.doc" as many times as you need it to. It renames them all with a time-based file name.

Source and destination directories and file names/extensions can be modified easily.

Copy this code and paste it in your HTML
  1. @echo off
  2. setLocal EnableDelayedExpansion
  4. set /p X=How many copies do you want? (Note: File to be copied must exist at C:\)
  5. :loop
  6. set /a N+=1
  7. if !N! gtr !X! goto :eof
  8. copy "C:\file.doc" "C:\%time:~,2%%time:~3,2%%time:~6,2%%time:~9,2%.doc"
  9. goto :loop

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.