Create a date and time stamped folder from cmd prompt
ok so you need to create a directory based on the current time and date, a timestamp if you will.
its easy, type this into your cmd window:
mkdir %date:~-4,4%%date:~-7,2%%date:~0,2%-%time:~0,2%%time:~3,2%%time:~6,2%
this will give you a directory named like YYYYMMDD-HHMMSS
Enjoy.
Tags: CMD, date stamp, mkdir, timestamp
This entry was posted
on
Wednesday, April 1st, 2009 at
11:58 am and is filed under
R & D .
You can follow any responses to this entry through the
RSS 2.0 feed.
You can leave a response, or trackback from your own site.
7:23 pm
Just so you know this also depends on your locale settings,
I tried to run this without any changes and got this
“200910We-151909″
the actual date string is
“Wed 06/10/2009″
so I did a little re-configuring of the string modifications
ECHO %date:~-4,4%%date:~7,2%%date:~4,2%-%time:~0,2%%time:~3,2%%time:~6,2%
10:35 am
@Hazard ABio
Thanks for the suggestion, great work!