How to rename a filename to current date with batch
![How to rename a filename to current date with batch](img/1/1/how-to-rename-a-filename-to-current-date-with-batch-300x256.jpg)
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.
10 yıl önce eklendi