To Capture copy time when copy folder from one to another

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
sanand7984
Posts: 4
Joined: 22 Feb 2013 18:10

To Capture copy time when copy folder from one to another

#1 Post by sanand7984 » 22 Feb 2013 18:14

Hi,

Can you please help to capture copy time in seperate text file when I start copy folder from one location to another location using Batch file.

Thanks,
Anandh.S

shirulkar
Posts: 40
Joined: 15 Jan 2013 23:53

Re: To Capture copy time when copy folder from one to anothe

#2 Post by shirulkar » 22 Feb 2013 18:26

Put "echo Copy started at %date%%time% >>file.txt" before copy command

sanand7984
Posts: 4
Joined: 22 Feb 2013 18:10

Re: To Capture copy time when copy folder from one to anothe

#3 Post by sanand7984 » 22 Feb 2013 18:44

Thanks,

Can you please send me the script for this. I am new for batch file creation. It would be helpful.

sanand7984
Posts: 4
Joined: 22 Feb 2013 18:10

Re: To Capture copy time when copy folder from one to anothe

#4 Post by sanand7984 » 22 Feb 2013 18:49

I am expecting that how many "hh:mm:ss" it would take copying the folder from one location to another location. I need the folder copy duration in a seperate file.

sanand7984
Posts: 4
Joined: 22 Feb 2013 18:10

Re: To Capture copy time when copy folder from one to anothe

#5 Post by sanand7984 » 22 Feb 2013 20:13

Is it possible or not? Can you please anyone help me on this.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: To Capture copy time when copy folder from one to anothe

#6 Post by foxidrive » 22 Feb 2013 22:15

It's possible. With plain batch it is tedious.

It would be better to use a program like timethis.exe that times a task:

---------------------------------------------------------------
TIMETHIS : Command Timing Utility : by kevina@microsoft.com
---------------------------------------------------------------

Usage : TIMETHIS "command"

TimeThis executes the command specified by its arguments, then reports its
run time in HH:MM:SS.TTT format. Quotes around the command are required only
when the command involves redirection via <, >, >>, or |, etc. Quotes ensure
that the redirection is applied to the command being timed, rather than the
TimeThis command itself.

Examples :

TimeThis DIR C:\WINNT
TimeThis "DIR C:\WINNT | MORE"

Post Reply