Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Date Stamp  (Read 15953 times)

0 Members and 1 Guest are viewing this topic.

isko98

  • Guest
Date Stamp
« on: April 25, 2004, 08:34:46 PM »
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

  • Guest
Re: Date Stamp
« Reply #1 on: April 25, 2004, 09:24:06 PM »
btw i am using Windows NT ver 4...

rosken

  • Guest
Re: Date Stamp
« Reply #2 on: May 12, 2004, 04:42:07 AM »
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%