I am trying to format the date and time in using batch scripting so that my file corresponds to current date time.
if current date time is:2015.09.02.13:21:22
I would like the file to be called: TEST.2015.09.02.13:21:22
Is this doable?
I am trying to format the date and time in using batch scripting so that my file corresponds to current date time.
if current date time is:2015.09.02.13:21:22
I would like the file to be called: TEST.2015.09.02.13:21:22
Is this doable?
I got it:
echo TEST.%date:~-4%.%date:~4,2%.%date:~7,2%.%time:~0,2%.%time:~3,2%.%time:~6,2%
and it should give:
TEST.2015.02.09.14.00.35