Parallel copy using xcopy

Pramod Karandikar picture Pramod Karandikar · Feb 9, 2012 · Viewed 9.1k times · Source

I need to copy multiple directories from one location to other. So, there are going to be multiple xcopy statements, one after another.

The number of files in each of the folders is huge. Is there some way by which I can run these xcopy statements in parallel? One option I can think of is- call each xcopy in a separate batch file, and call those batch files using @start instead of @call.

Is there any other alternative?

Answer

Simon picture Simon · Feb 9, 2012

You can start xcopy directly, like so start xcopy [parameters]. This allows you to run many xcopy instances in parallel.

By the way: Have you tried robocopy? It's included in all recent Windows versions and offers more options (and sometimes performance) than xcopy.

But in general copying multiple directories in parallel is slower (at least when you copy from a drive to another drive), because it'll force the source drive to seek between the parallel copy jobs instead of reading files sequentially.