In a recent tip, we explained that you can use the Now.exe command
included with the Windows 2000 Resource Kit to generate a timestamp (date and
time) from within a batch file. Generating a timestamp in this way helps you
track when a specific process starts and ends within the batch file.
Another tool in the Windows 2000 Resource Kit that will help you track
the time spent by a batch file overall is Timethis.exe. This tool executes the
command you specify and tracks the total time until completion. For example,
you might execute a backup job with Timethis.exe to determine how long the job
took to complete. The syntax for the program is:
Timethis.exe does not support any arguments of its own, but
you can include arguments for the command to be executed, as well as
redirection characters. If you include these arguments or redirection
characters, however, you must include the command in quotes, as in this
Timethis.exe "DIR C:\ > FileList.txt"
When the command completes, Timethis.exe displays the
elapsed time on the screen.
Want more Win2K tips and tricks? Automatically sign up for our free Windows 2000 Professional newsletter, delivered each Tuesday!