xcopy can not create directory win7

Posted on 2010-09-01
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments


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 2000 total points
ID: 33580458

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Suggested Courses

765 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