Skip to content

Instantly share code, notes, and snippets.

@actaneon
Created July 1, 2009 16:03
Show Gist options
  • Save actaneon/138845 to your computer and use it in GitHub Desktop.
Save actaneon/138845 to your computer and use it in GitHub Desktop.
For /F "tokens=1*" %%a In ('date /T') Do Set Date=%%a %%b
REM MM/DD/YYYY
Set PrintDate=%Date:~4,10%
REM YYYYMMDD
Set FileDate=%Date:~10,4%%Date:~4,2%%Date:~7,2%
REM HH:MM:SS.MS
Set PrintTime=%Time%
REM HHMMSSMS
Set FileTime=%PrintTime:~0,2%%PrintTime:~3,2%%PrintTime:~6,2%%PrintTime:~9,2%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment