We help IT Professionals succeed at work.

Script or batch to copy and rename files

Last Modified: 2018-09-26
Need a script or batch to copy a file and rename it, looping X number of times. For instance, I have a file named 180816.SKD. I need to copy that file and rename to 180817.SKD, 180818.SKD, etc. In order to eliminate not having to mess with dates, I could simply start with 180801.SKD and the script could loop through 30 times, naming each copy advancing 01 (180801.SKD) through 31 (180831.SKD).
Watch Question

Test your restores, not your backups...
Expert of the Year 2019
Top Expert 2016
This one is on us!
(Get your first solution completely free - no credit card required)
Murry CamperIT Admin


Great work, as always Bill!
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.