SyntaxFix
Write A Post
Hire A Developer
Questions
Extract the hour, look for a leading space, if found replace with a zero;
set hr=%time:~0,2% if "%hr:~0,1%" equ " " set hr=0%hr:~1,1% echo Archive_%date:~-4,4%%date:~-10,2%%date:~-7,2%_%hr%%time:~3,2%%time:~6,2%.zip