another solution which does not require the enter and return keys.
create a .bat file with the following in it:
echo|more|date|find "Current" >> %1
echo|more|time|find "Current" >> %1
I Named this NowStamp.bat
from within the original batch file, when ever you need the date & time type:
Call NowStamp c:\temp\logfile.txt
You will now have the date and time stamp in logfile.txt
Be sure to include the 'Call', so after NowStamp runs it will return to your
controlling batch file.
-----Original Message-----
From: Richard Quilhot, C.N.A. [mailto:[log in to unmask]]
Sent: Monday, August 30, 1999 1:06 AM
To: [log in to unmask]
Subject: Re: [PCSOFT] Date and time in batch file
Step 1. Create a text file with just the enter or return keystroke in it.
Step 2. Pipe the text file into the time command (Time<Textfile) and the
results to your log (Time<Textfile >> Logfile).
This will also enter a line for "Enter new time:" into your log.
Step 3. Repeat step 2 with Date as the command.
Q-Factor Consulting
Richard Quilhot, C.N.A.
Mail to: [log in to unmask]
-----Original Message-----
From: PCSOFT - Personal Computer software discussion list
[mailto:[log in to unmask]]On Behalf Of Mike Curtis
Sent: Sunday, August 29, 1999 8:37 PM
To: [log in to unmask]
Subject: [PCSOFT] Date and time in batch file
I am trying to write a batch file that will backup my quicken files to
floppy.
I would like to have the date and time written to a log file when the files
are
copied to the floppy. Is there a way to pass the date and time without
having
to press enter? Here is the file as I have it so far:
c:
cd\quicken\backup
xcopy32 *.* a: /r/i/c/h/k/e/y/f >>a:\qcopy.log
Thanks in advance for any help with this.
Mike Curits
PCSOFT maintains many useful files for download
visit our download web page at:
http://nospin.com/pc/files.html
PCSOFT maintains many useful files for download
visit our download web page at:
http://nospin.com/pc/files.html
Curious about the people moderating your
messages? Visit our staff web site:
http://nospin.com/pc/staff.html
|