1.

Solve : msdos time log?

Answer»

Hi guys,

I have just worked out how to put a timelog on my backup files across a network.

However, is it possible to also add the date ALONGSIDE the time ?

The logfile reads just the time of backup like this:

The current time is: 17:35:04.01
The current time is: 17:36:17.43
The current time is: 17:43:30.48

But as you SEE theres no date of the backup, how would I need to modify the file to "stamp" the date as well.

The command I have used is from the COMPUTER help pages and this is it:

echo. |time |find "current" >> Outlookbackup.log

Many thanks in anticipation of a reply.

Hey ..... I have figured it out......dont worry. If you were to type:

@echo off
echo %date%
would give you for ex.) Mon 10/17/2005

To put it in the previous colon format without the "mon" as the day you would type:

@echo off
set mydate1=%date:~4,2%
set mydate2=%date:~7,2%
set mydate3=%date:~10,2% (for 2005)

or
set mydate3=%date:~12,2% (for 05)

echo %mydate1%:%mydate2%:%mydate3%


HOPE THIS HELPS










Discussion

No Comment Found