Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parallel copy using xcopy

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?

like image 645
Pramod Karandikar Avatar asked Feb 09 '12 17:02

Pramod Karandikar


1 Answers

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.

like image 169
Simon Avatar answered Nov 08 '22 05:11

Simon