I have developed a simple batch file which I want to set up as a scheduled task to move a file.
Currently, this is my code;
move /-y "C:\Folder\Folder\Folder\*File*.csv" "C:\Folder\Folder\Folder\Folder\File.csv"
pause
However, this will obviously lead to duplicates (and an overwriting conflict after the second transfer)
How do I append a date (The file will only be moved once daily) or unique identifier to solve this issue?
Thanks
Try
Note: the numbers 6,4 3,2 0,2 in above commands depend on your date formatting. Check your control panel (or use
echo %date%) for your default date format. Off course, you can change the order 🙂My default date formatting is DD/MM/YYYY & this snippet changes it to YYYY_MM_DD