Answer» I want to use a batch file to start 4 programs and I would like to create a log to show what date and time they where started. I can ge the programs to start and even have the log but this is what it looks like....
The current date is: Sat 10/20/2007 Enter the new date: (mm-dd-yy) The current date is: Sat 10/20/2007 Enter the new date: (mm-dd-yy) The current time is: 23:13:08.95 Enter the new time: The current date is: Sat 10/20/2007 Enter the new date: (mm-dd-yy) The current time is: 23:13:08.95 Enter the new time:
How do I get it down to 1 date and 1 time? Can I append the date and time to the log for record purposes instead of just the last time it was run?
Thanks in advance for your HELP.
richocki Please post your .bat file.Yeah I guess that would have helped... sorry about that
START /min C:\_internet\spywall\spywall.exe START /min C:\_tools\winpatrol\winpatrol.exe START /min C:\_tools\REGRUNSUITE\WatchDog.exe START /min C:\_tools\StartupGuru\StartupGuru.exe START /min D:\_Applications\YCiii\YankClip.exe copy startlog + date + timeFor your FINAL line try:
echo Programs started on %date% at %time% >> Startlog
You have used the date and time commands which are called to AMEND the date/time at the command prompt.
The >> causes the OUTPUT of the echo command to be ADDED to the startlog file so that the start info will be appended to the file and will remain there until you delete the entries. You can amend the text string and the %date%/%time% outputs to suit your requirements.
Good luckDusty thank you for your help. That is exactly what I wanted to do. Thanks again You're welcome - thanks for coming back to report your success..
|