Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm setting up an archive process to store old files on an external hard drive. The computer in question is running Windows 7 Pro 32bit. We have a server folder with 150,000+ files in it, most of which are pretty small (below 200k). I'm trying to use robocopy in a batch file to do this. It was working fine the other day, now all it does upon launch is sit there. It shows me all the options and whatnot, and also lists the number of files in the directory and the directory itself, but it never gets past that line. If I switch the destination to the local C drive, it eventually starts copying files. Is there something in my batch file that needs to change? Or could there be a problem with the external Western Digital drive that I'm using? The WD drive currently is holding about 175,000 files. Here is the one line batch file I have:

    robocopy "\\cgifp01\Prepress\Public\ImportedPDF" "E:\OldFiles" *.* /R:2 /W:10 /MINAGE:15 /MOV /B /XJ /XF "blank_test.pdf"

Thanks for any tips or ideas.


share|improve this question

migrated from Nov 13 '12 at 8:32

This question came from our site for professional and enthusiast programmers.

if your destination E:\OldFiles already contains files, robocopy will scan them first to see what to do (overwrite with newer, leave them, ...) and then starts with the copy command. So if you have 150000 files in destination, it can take a while. if you would copy it to E:\OldFiles1, it would start immediatly as there are no files there yet.

share|improve this answer

Well for anyone else struggling with the same problem, here's how I got around it. I changed the batch file to copy from the network location to a temp folder on the external drive. Then I have another line that does a robocopy from the temp location to the actual archive folder. I have no idea why that works, but it does. It doesn't make any sense to me, since robocopy is still having to copy files into the external directory, but maybe since it's not copying from the network it works better. I have no idea. All I know is that it works now.


share|improve this answer

I have been using robocopy for many years to copy from my server to a USB drives - 64GB, 1TB, 2TB, 3TB. But about a month ago I noticed that the file copy would stall on some ordinary file, eg a JPG. If I went to the target directory or some other directory on the target drive and created a new text file, the copy would then resume, but stall a while later. Repeating the trick allowed backup to continue. Tried a lot of options but no solution. Very frustrated. Win7Pro32bit, Kaspersky Internet Security

This is just local computer to local USB drive - problem seems to be on larger drives ie 2TB and 3TB.

ROBOCOPY "%FROM%" "%TO%" /E /XO /W:0 /R:0 /XF *.bak *.old *.zip *.arc *.rar *.z *.db /XD ARCHIVE OLD ZIPS /LOG+:"%LOG%" /NP /DCOPY:T /NJH /NJS /TEE /NC /NS /NDL /IPG:20 /FFT
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.