How to rename a filename to current date with batch
In windows environment, it is possible to rename files through command prompt. You need "ren" command to complete the operation.
ren old-file-name new-file-name
It is also possible to use command prompt commands from batch files.
To rename test.log to YYYYMMDD.log create a rename.bat file with content
ren "test.log" "%date:~10,4%%date:~7,2%%date:~4,2%.log"
Using this batch command, you can rename filenames to current date.
added 10 years 6 months ago