This tip was printed from the MalekTips Computer and Technology Help and Tips website at http://malektips.com.

Windows XP and DOS - Echo Date, Time, and Message

SUMMARY: Easily allow your Windows XP batch files to display debugging information along with a timestamp.

Useful for batch file reporting or debugging purposes, entering 'now' in a Windows XP batch file echoes the date and time to the standard output. You can also add text after the command to display such information to the user. To use this, you must have already downloaded the Windows 2003 Resource Kit (Windows 2003 Resource Kit download/install instructions).

For example, the following command echoes the date, time, and text "Batch Process Start" to the user:

now "Batch Process Start"

This is great for benchmarking, as you can pipe this command to a logfile to record when a batch file begins or ends:

now "Batch Process End" > logfile.txt

Or, you can just use the logtime Windows XP command, as mentioned elsewhere on MalekTips.


 


Press the "print" button on your browser or select "File" - "Print" to print this tip. Then, return to Windows XP and DOS - Echo Date, Time, and Message
 
Standard disclaimer applies - read http://malektips.com/disclaim.html.