Batch file creating folder with time stamps creates space if time is < 10 -


set hh=%time:~-11,2% set /a hh=%hh%+100 set hh=%hh:~1% set datetime="r%date:~10,4%%date:~4,2%%date:~7,2%_%time:~0,2%-%time:~3,2%"  mkdir %datetime% 

if time before 10:00am, ie- r20140324_ 9-59 space added after underscore. how can "0" r20140324_09-59?

set datetime="r%date:~10,4%%date:~4,2%%date:~7,2%_%time:~0,2%-%time:~3,2%" set datetime="%datetime: =0%" echo mkdir %datetime% 

%var:string1=string2% substitutes string2 string1 in var rey assigned destination variable.

(mkdir echoed verification)


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -