Server Fault is a question and answer site for system and network administrators. 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 have created a batch file to copy and zip up an entire drive of data on my server. I have selected the D:\ drive to be copied and zipped. However, I have one problem. When I run the batch file, only certain files from the D:\ drive are being copied over. Why am I having problems transferring all of the drive over to my backup source?

share|improve this question
It's hard to answer this question without seeing your batch file. – larsks Jun 13 '11 at 15:45
Also - it might be better to zip it first and catch any errors there, then copy it. – mfinni Jun 13 '11 at 16:23
up vote 1 down vote accepted

It could be that those files are in use at the time the batch file runs. Are you running this process to backup your files to another server? What exactly is this process used to accomplish? There may be better options available.

share|improve this answer
Indeed the files were in use. I was planning on backing these files up to another server. Instead I decided to use windows backup utility to transfer the files over then use robocopy to zip up the files to preserve space. Thanks – GMitch Jun 13 '11 at 22:02

To move things along - what copy command are you using? If you use robocopy, it's got very good logging options that can answer this for you. That will tell you what's failing and probably why.

Files could be in-use. Your copy user might not have permissions. Those are the two things that jump immediately to mind. Going further into 'unlikely' territory, you could have paths that are too long, or have run out of disk space.

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.