I want to rename a file by appending today's date in the formay of MMYY.
Example:
Current File = file.csv
Desired File = file1011.csv
I have the below script, however, it renames the file with a four digit year file102011.csv.
Appreciate any tips and help.
Thanks,
AW
-------------
@Echo Off
Set MMyy=%DATE:~4,2%%DATE:~10,4%
ren \\FHGP1\finance\andrew\medassets\file.csv file%date:~4,2%%date:~10,4%.csv
-------------
Example:
Current File = file.csv
Desired File = file1011.csv
I have the below script, however, it renames the file with a four digit year file102011.csv.
Appreciate any tips and help.
Thanks,
AW
-------------
@Echo Off
Set MMyy=%DATE:~4,2%%DATE:~10,4%
ren \\FHGP1\finance\andrew\medassets\file.csv file%date:~4,2%%date:~10,4%.csv
-------------