|
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 Copy to Clipboard
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%'
Get day of week (0=Sunday, 1=Monday, 6=Saturday, set to var %dow% Copy to Clipboard
setlocal
for /f %%d in ('"powershell (Get-Date).DayOfWeek.Value__"') do set dow=%%d
|