Skip to content

Instantly share code, notes, and snippets.

@uuklanger
Last active January 9, 2017 19:12
Show Gist options
  • Save uuklanger/d8de80bf23aa13e9e1e1f48262583946 to your computer and use it in GitHub Desktop.
Save uuklanger/d8de80bf23aa13e9e1e1f48262583946 to your computer and use it in GitHub Desktop.
File Batch Date and Time
REM C:\Users\k.langer>echo %FNAME%
REM ARC_20150209_115340.zip
set hr=%time:~0,2%
if "%hr:~0,1%" equ " " set hr=0%hr:~1,1%
set FNAME=ARC_%date:~-4,4%%date:~-10,2%%date:~-7,2%_%hr%%time:~3,2%%time:~6,2%.zip
echo %FNAME%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment