Windows
Read More
Formatting date in MS-DOS batch file
I needed to make a simple MS-DOS backupscript in Windows XP today and the files were supposed to be stored in folders named by the current date, ISO style. I ended up formatting the date using the following command echo %date:~6,8%-%date:~3,2%-%date:~0,2% Output 2007-10-02 The script @echo off REM Declare variables Set TODAYSDATE=%date:~6,8%-%date:~3,2%-%date:~0,2% Set DATADRIVE=c: Set […]