xcopy can not create directory win7

Posted on 2010-09-01
Last Modified: 2012-06-27
I wish to make a backup copy to a hard drive of my network files

First pass through it works fine and copies all directories and files.

Second pass I wish it only to copy new files (created after the file on the backup) and I use the below in a bat file

It comes back and says
Access Denied
Unable to create directory

g: is the backup drive and z: is the network drive

The batch file is below
xcopy z:\*.* /E /C /F /H /R /D /Y g:\HDrive

Question by:BobMc7771
  • 3
  • 2
  • 2
LVL 14

Expert Comment

by:Daniel Junges
ID: 33579939
Sounds like a permissions error. Can you do a plain COPY of a file to the win7 machine?

Author Comment

ID: 33579977
The xcopy command works the first time through (when it copies to a blank disk) and it copies everything

It errors when I am asking it to copy only new or updated files and in that case overwrite the old files

If it was permissions I thought it would not let me do the first step (copy everything)

Am I thinking correctly on that?
LVL 14

Expert Comment

by:Daniel Junges
ID: 33580042
please try to copy with explorer one from the files that fails with xcopy
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline


Author Comment

ID: 33580147
I copied a file with explorer from the network to the hard drive intended as the backup and it worked fine

LVL 14

Expert Comment

by:Daniel Junges
ID: 33580236
hi BobMc7771,
i have tested the xcopy with you options and copied data into a network drive, it work fine.
Please try to make an sub-directory on you g: drive and copy it into this new dir
LVL 63

Expert Comment

ID: 33580451
I would use the free Robocopy instead.

I hope this helps !
LVL 63

Accepted Solution

SysExpert earned 500 total points
ID: 33580458

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT ( The crux of this batch f…
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now