Users Pricing

forum

Home Forums Measure copying time through windows explorer C# – MindStick

Measure copying time through windows explorer C#

Anonymous User 2272 05 Oct 2013

I am creating  a method 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);
        SendKeys.Send("^(C)");
        command = @"/select, " + fileDestination;
        System.Diagnostics.Process.Start("explorer.exe",command);
        DateTime startCopy = DateTime.Now;
        SendKeys.Send("^(V)");

        //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...


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md