1.

Solve : TimeStamp on the Log file?

Answer»

Hi,

I am trying to SCHEDULE a batch file to run at specific intervals and i am trying to run a command line utility.

I am redirecting the output into a log file log.txt

i need to GET the time stamp in the file name like
logMMDDYYHHMMSS.txt

I am not particular about the order of the time stamp.


Can anybody HELP me in creating this batch file as desired.

Thanks
Kalseeby the way the OS is WINDOWS 2000I use the lines below. This will write 4 lines to the end of the log file, SHOWING date, time, reason and a few dashes for spacing.

echo. |date /t >> e:\logs\log.txt
echo. |time /t >> e:\logs\log.txt
echo. Reason for Log >> e:\logs\log.txt
echo. ---------- >> e:\logs\log.txtHi Richard,

Thanks for spending time to reply for my query.

But Here is what i am looking for.

I am trying to name the log file with the time stamp.

Example : G:\LogMMDDYYHHMMSS.txt

that way i'll have a new file created each time the batch file is fired. and all the file names will be unique.

Thanks
Kalyan



Discussion

No Comment Found