Copy 20 files at a time from drive G to drive H

donpick used Ask the Experts™
Running Windows 7 Pro on a Dell T3400.

I need to copy a large number of files from drive G to drive H.  Both drive G and H are usb drives.  They are connected to the T3400.

Drive G contains files in multiple directories.

Currently drive H has no data on it.

The T3400 is not a fast computer.  Drive G has about 20,000 files on it.  If I use Robocopy to copy all the files on drive G to drive H, the I/O is going to slow down the computer considerably.  

I'd like to somehow copy say 20 files at a time from drive G to drive H

My knowledge of system programming and scripting is limited.  
I thought if I could create a simple batch file containing file names on drive G then I could edit the batch file and make sure only 20 files were listed in the batch file.

I tried creating a list of files to be copied by using the DIR command:

Dir *.* /b > c:\filelist.txt

This produces a list of files but some of them are listed as:

I don't know how I would be able to write a script which would remove the <Dir> from the list.

There must be a simpler way to do this.

What process would you create to perform this task?   Please give me a DETAILED answer.

Thank you.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
the /IGP parameter could be used to slow the copy down, so it could run in the background without slowing the machine much. Try with maybe /IGP:100 then adjust as needed.
Dr. KlahnPrincipal Software Engineer

If the drives are identical sizes, image G (data) to H (empty) using your favorite imaging tool.  Most good imaging tools allow throttling the transfer bandwidth.
Senior Infrastructure Analyst
Go download Microsoft Richcopy and you can specify the number of files to copy at the same time.

It's essentially robocopy but it has a very nice GUI to select details like you're asking for :D


CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

Bill PrewIT / Software Engineering Consultant
Top Expert 2016
ROBOCOPY normally defaults to 8 threads at a time, so could be concurrently copying 8 data streams in parallel, which will put a heavy load on the system.  The first thing I would try is reducing that to 1 bu using the /MT:1 option on your command line.

With regards to the DIR command, you can use the /B option to remove all heading and just get a list of file names.

One question I had was do you want periodic gaps in this copy process where no files are being copied, or do you just want to copy files at a rate that doesn't overload the receiving computer?



Mr Prew:

If I could wish for the perfect solution:
- some application which could copy 20 files and know the name of the 20th file so it knows where to start again.
- OR I could leave my pc on all night and the copy application could detect the overall amount of I/O use and note when the I/O had decreased so the copying could use more system resources.

Also, I included the /B option in my Dir command and still there were the strange characters after the file name.

Mr Green:
  Thank you for the link.  I will try this.
Top Expert 2013

if you try richcopy - i'm curious to see your result
i tried it too ( on his recommendation) and it seems to work; but the results are not Always 100%
Bill PrewIT / Software Engineering Consultant
Top Expert 2016
Did you try the /MT:1 option I mentioned and what was the result?

I'm concerned about the extra characters on the DIR /B command, that could indicate corruption on that drive.

You might also take a look at UltraCopier too, it allows throttling copy speed and other options.

If you are doing to copy during the night hours wouldn't you want it to use as much resource as possible to make the copy go faster?  Or is this computer in use 24 hours a day?



Mr. Prew:

Yes, I tried the /MT:1 option, Robocopy was running all night and was still running in the morning.  
I am not an expert with Robocopy.  It seems it can produce a list of files.  I'm going to be away from my pc until Saturday so on Saturday I will see if Robocopy can create a list of files.

If so then I could edit the list and see if I can find a way to insert an xcopy command on each line in the list file.  
Why xcopy? Well, I don't know of any way to feed a list of files to Robocopy and have it copy files in a list.

Yes, I will look at UltraCopier .  Did not know this exists so I really appreciate this links you provide.

You have been very helpful in the past.  I'll try Richcopy on Saturday and let you know.


I have other tasks which must be done so I will close this question now.


Thanks to all .

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial