Lots of Date Batch File examples are on this page:
https://www.robvanderwoude.com/datetime.php More pages are available too: https://www.robvanderwoude.com/bht.php rem Set the date in the format "2020-10-24" to the variable %Today% FOR %%A IN (%Date%) DO ( FOR /F "tokens=1-3 delims=/-" %%B in ("%%~A") DO ( SET Today=%%D-%%B-%%C ) ) echo Date to use for filenames: '%Today%' |