"Offering free computer help, hints, and tips to the Internet populace." Now with over 3,820 tips!

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.



Print This Tip

Get E-Mail When New Tips are Online

Return to the Windows XP and DOS page.

 


New in MalekTips:

RSS Feeds- Subscribe!

You want the latest tech tips and tricks in your e-mail Inbox - FREE? Type your e-mail address below and click 'Get Tips!'.
 


( sample / details )
( opt-out instructions )