Windows 7 Forums


Windows 7: Timing an Operation in a Batch File.

31 May 2012   #1

Windows 7 Home Premium (Retail) Full version - With SP1
 
 
Timing an Operation in a Batch File.

I have a simple batch file to copy using xcopy to place a copy of certain files onto an external usb hard disk. I would like to find a way to time how long it takes to complete the copying. Is there a function or something I can can call at the batch file start and record the system clock time and then call again at the end of the batch file right before a pause statement that will allow me to determine how long the operation ran? I guess I am asking if can build a 'stopwatch' into the batch file.

Thank you.

My System SpecsSystem Spec

01 Jun 2012   #2

Win 7 Pro x64 SP1, Win 7 Ult x86 SP1
NC, USA
 
 

Try adding this command at the start and end of the BAT file:
time /t

See if that gets what you want.
My System SpecsSystem Spec
01 Jun 2012   #3

Windows 7 Home Premium (Retail) Full version - With SP1
 
 

Quote   Quote: Originally Posted by DavidW7ncus View Post
Try adding this command at the start and end of the BAT file:
time /t

See if that gets what you want.
Thank you David. That will do nicely.
My System SpecsSystem Spec
.


01 Jun 2012   #4

Win 7 Pro x64 SP1, Win 7 Ult x86 SP1
NC, USA
 
 

You're welcome and glad it worked...
Thanks for replying back.
My System SpecsSystem Spec
Reply

 Timing an Operation in a Batch File. problems?



Thread Tools



Similar help and support threads for: Timing an Operation in a Batch File.
Thread Forum
Solved batch file General Discussion
Solved Batch File that grabs file names from folder to insert into batch file General Discussion
Help required creating batch file to read .csv file General Discussion
batch file open file for program in the startup folder General Discussion
How to create a batch file that will move files based on the file type General Discussion


All times are GMT -5. The time now is 03:40 PM.


Seven Forums Android App Seven Forums IOS App Follow us on Facebook

Windows 7 Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32