Solved

xcopy can not create directory win7

Posted on 2010-09-01
7
618 Views
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
*************************************
g:
cd\HDrive
xcopy z:\*.* /E /C /F /H /R /D /Y g:\HDrive

0
Comment
Question by:BobMc7771
  • 3
  • 2
  • 2
7 Comments
 
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?
0
 

Author Comment

by:BobMc7771
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?
0
 
LVL 14

Expert Comment

by:Daniel Junges
ID: 33580042
please try to copy with explorer one from the files that fails with xcopy
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

Author Comment

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

0
 
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
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 33580451
I would use the free Robocopy instead.

I hope this helps !
0
 
LVL 63

Accepted Solution

by:
SysExpert earned 500 total points
ID: 33580458
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

786 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