May
06
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.

The sample produces an incorrect format like 2009ep4. Check your code please
Hi Programmer, It works exactly as expected on Vista Ultimate and Win 2003 Server.. what are you running?
Thanks for the example. Please note that the systems’ date/time format needs to be taken into consideration; easy to modify for that.
Post a Comment