Home > DeveloperSection > Forums > Measure copying time through windows explorer C#
F Scott Fitzgerald
F Scott Fitzgerald

Total Post:29

Posted on    October-05-2013 7:38 AM

 C# C# 

 1 Reply(s)
 715  View(s)
Rate this:

I am creating a mthod which is measures the copy time for files and folder.

 public static TimeSpan CopyFileExplorer(string filePath, string fileDestination)
        string command = @"/select, " + filePath;
        System.Diagnostics.Process.Start("explorer.exe", command);
        command = @"/select, " + fileDestination;
        DateTime startCopy = DateTime.Now;
        //need to be catched when explorer finishes the copy
        DateTime endCopy = DateTime.Now;
        return endCopy - startCopy;

I have tried to find when the "copy window" of explorer disappears, but I didn't be successful...

Ida B Wells
Ida B Wells

Total Post:30

Posted on    October-05-2013 8:58 AM

You should try SendKeys.SendWait("");

Don't want to miss updates? Please click the below button!

Follow MindStick