I am attempting to write a batch file that will auto-move a file from a specific directory once it is created(e.g. if exists move file.png to backupfile.png)
My issue is to prevent the file from being over-written, as I need all iterations of the file saved into separate files, I would like to append either the system time or a number say 1,2,3 etc so that I have unique file names everytime.
I tried using the system time but cannot find a way to set this as a variable that I can append to the file name when it is moved.
Does anyone know how to do this?
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!