• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 655
  • Last Modified:

xcopy can not create directory win7

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
BobMc7771
Asked:
BobMc7771
  • 3
  • 2
  • 2
1 Solution
 
Daniel JungesCommented:
Sounds like a permissions error. Can you do a plain COPY of a file to the win7 machine?
0
 
BobMc7771Author Commented:
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
 
Daniel JungesCommented:
please try to copy with explorer one from the files that fails with xcopy
0
[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

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

0
 
Daniel JungesCommented:
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
 
SysExpertCommented:
I would use the free Robocopy instead.

I hope this helps !
0
 
SysExpertCommented:
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now