|
Answer» Hi All,
I WOULD like to amend and EXISTING batch program. The current batch program takes files from a laptop and uploads them to a server. I would like to add a parameter to the file that will create a unique name each time the files are loaded so that files are not overwritten with multiple uploads.
I am not very familiar with how to write this into the code and have spent sometime looking into a few options, one being adding a timestamp to the file as it is copied from the laptop to the server.
I am very beginner and hoping that just a line or two of code is needed to add the unique information to the files. I would be equally satisfied at this point with just an incremental increase i.e. file_1.txt, file_2.txt, etc.
If anyone has done this before or has any idea on how to do it, I would really appreciate your help.
Thank you!How are the files being copied with the current batch file?
You can GET timestamp values from the %DATE% and %time% variables. What format do you want the TIMESTAMPS in? YYYYMMDD would be (for the US English locale): Code: [Select]%date:~-4%%date:~-10,2%%date:~-7,2%
|