jobsqosa.blogg.se

Robocopy faster
Robocopy faster






robocopy faster

Now since that was using a USB2.0 device, I'm likely going to re-run this test over a network drive before really implementing it into my application.

robocopy faster robocopy faster

Directory.Move() that loops through the top-level folder's directories and files -> 973ms (20 run average).Recursive Routine that digs into the structure and uses FileInfo.MoveTo() -> 38,499ms (20 run average).Var files = Directory.GetFiles(MoveSource) Here was my code for a top-level move (one that doesn't dig into folder structure, compare or filter files, or log anything) var dirs = Directory.GetDirectories(MoveSource) Total elapsed time: 225,215ms (performed 1 run only because I know this operation is several minutes on average in my application using this method, so the result was well within expected) Rc.CopyOptions.CopySubdirectoriesIncludingEmpty = true Rc.CopyOptions.MultiThreadedCopiesCount = 1 Rc.CopyOptions.MoveFilesAndDirectories = true Using RoboSharp to perform the move operation: RoboSharp.RoboCommand rc = new RoboCommand(MoveSource, MoveDest, true) I finally have some time to perform and report the results of my testing here for anyone in the future who might have a similar question.ĭoing a loop at the top-level if way faster.ġ94MB of files -> 2,696 Files, 87 Folders








Robocopy faster