copy /w slow relative to robocopy /mir

May 30, 2008
11
0
I keep offline copies of my working directories on external USB 3.0 drives. Over the years I have developed batch files to update these copies using both RoboCopy and TCC's copy command. I have noticed that the built in copy command (copy /w ...) is about 10 times slower than robocopy (robocopy /mir ...). I have included below timed sample using the largest working directry which consists of about 154K files (40GB).

Code:
REM #1: Show mirror changes with robocopy
timer /q robocopy /l /njh /njs /ndl /xj /copy:dat /fft /r:1 /w:1 /mir c:\pclp d:\pclp
Timer 1 off:  9:23:00  Elapsed: 0:00:10.357

REM #2: Show one-way sync changes with copy
timer /q copy /n /h /z /l /uf /s /ne /w c:\pclp d:\pclp
     0 files would be copied
Timer 1 off:  9:24:48  Elapsed: 0:01:48.542
REM About 10 times longer than robocopy (#1)

REM #3: Show copy changes with copy
timer /q copy /n /h /z /l /uf /s /ne c:\pclp d:\pclp
     0 files would be copied
Timer 1 off:  9:25:28  Elapsed: 0:00:39.675
REM About 2.5 times faster than one-way sync (#2)

REM #4: Make mirror changes with robocopy
timer /q robocopy /njh /njs /ndl /xj /copy:dat /fft /r:1 /w:1 /mir c:\pclp d:\pclp
Timer 1 off:  9:25:38  Elapsed: 0:00:09.872
REM Unchanged relative to showing changes (#1)

REM #5: Make one-way sync changes with copy
timer /q copy /h /z /l /uf /s /ne /w c:\pclp d:\pclp
     0 files copied
Timer 1 off:  9:42:27  Elapsed: 0:16:49.340
REM About 9 times slower relative to showing changes (#2)
REM About 100 times slower than robocopy (#4)

REM #6: Make copy changes with copy
timer /q copy /h /z /l /uf /s /ne c:\pclp d:\pclp
     0 files copied
Timer 1 off:  9:43:08  Elapsed: 0:00:40.874
REM Unchanged relative to showing changes (#3)
 
Last edited: