Microsoft > Microsoft DOS
Date Stamp
(1/1)
isko98:
hi all,
this is a silly question but i hope you all can help me...
i want ot create a log file that has a date stamp... say after running a bat file, it will generate a log file bat_042604.log (for bat file run on Apr 26 '04) and bat_042704.log for run on Apr 27 '04.
what command can i use to put the date on a variable in a format 042604 an not 04/26/04
can any one help
isko98:
btw i am using Windows NT ver 4...
rosken:
Hi
I use this to make a folder named as date.
Ihave tested it with rename it seemed ok
I believe you can use it for time aswell
FOR /f "tokens=2-4 delims=/ " %%a in ('DATE/T') do SET date=%%a-%%b-%%c
md %date%
Navigation
[0] Message Index
Go to full version