Using Windows 2000 Professional OS:
I have been trying to use a DOS command to create a type of log file. This file would include a message indicating that my process completed along with the date and time (on the same line).
I've tried:
a)echo process completed - %date% %time% >>c:\outfile.txt
b)echo process completed - >>c:\outfile.txt
date /t >>c:\outfile.txt
time /t >>c:\outfile.txt
Option (a) gives me all of the information on a single line except that the time is a military time and I want a standard time.
Option (b) produces a standard time but it also writes each piece of information on a separate line and I cannot figure out how to combine all of this information onto a single line.
Please help me to either change the time in option (a) to a standard time or concatenate all of the information in option (b) to a single line. Thanks!
I have been trying to use a DOS command to create a type of log file. This file would include a message indicating that my process completed along with the date and time (on the same line).
I've tried:
a)echo process completed - %date% %time% >>c:\outfile.txt
b)echo process completed - >>c:\outfile.txt
date /t >>c:\outfile.txt
time /t >>c:\outfile.txt
Option (a) gives me all of the information on a single line except that the time is a military time and I want a standard time.
Option (b) produces a standard time but it also writes each piece of information on a separate line and I cannot figure out how to combine all of this information onto a single line.
Please help me to either change the time in option (a) to a standard time or concatenate all of the information in option (b) to a single line. Thanks!