Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Xcopy cannot create directory

15 Feb 2012   #1
dougham

Windows Vista and 7
 
 
Xcopy cannot create directory

My backup cmd file has been in use since XP, through Vista to Win7. It has worked on a new laptop in Win7 ever since Win7 was released. Recently it has stopped working getting an access denied, cannot create directory message. It is xcopying my own folders, not the default documents etc.
In a cmd prompt, xcopy d:\data z:\ fails with the error, but copy d:\data z:\ doesn't.
Has MS patched xcopy recently? If so, how can I get back the earlier version?


My System SpecsSystem Spec
.

15 Feb 2012   #2
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

Hi dougham,

This sounds like a permissions issue. Please try this option:

Code:
 
xcopy d:\data z:\ /T /O
/T = create directory structure
/O = Copy file ownership and ACL information

Let us know if it works for you.

Regards,
Golden
My System SpecsSystem Spec
15 Feb 2012   #3
dougham

Windows Vista and 7
 
 

Hi Golden

Using exactly as you suggest gives error "Access denied".

The strange thing I find is COPY works but XCOPY doesn't!

Cheers

Dougham
My System SpecsSystem Spec
.


15 Feb 2012   #4
FliGi7

XP / Win7 x64 Pro
 
 

Has your Z drive always been connected to your Win7 machine or have you recently connected your external Z drive to another machine?
My System SpecsSystem Spec
15 Feb 2012   #5
dougham

Windows Vista and 7
 
 

The Z: drive is a network drive, not connected specifically to the Win7. My desktop and my wife's laptop all have a drive mapped to the NAS.
Again I come back to why copy works but not xcopy.
My System SpecsSystem Spec
15 Feb 2012   #6
FliGi7

XP / Win7 x64 Pro
 
 

And nothing has changed in your batch file between the times it worked and now that it doesn't?

I would verify you still have the proper permissions on the drive in the NAS as well.
My System SpecsSystem Spec
16 Feb 2012   #7
dougham

Windows Vista and 7
 
 

No the batch file hasn't changed.
I am doing all the tests manually now
My System SpecsSystem Spec
16 Feb 2012   #8
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

Mmm. OK, I wonder if its as simple as trying this:

Code:
xcopy d:\data\*.* z:\ /T /O /I /Y /E
Note the *.* after d:\data\

Regards,
Golden
My System SpecsSystem Spec
23 Feb 2012   #9
dougham

Windows Vista and 7
 
 

I've attached the output from another attempt. I copy OK, but can't xcopy.


Attached Thumbnails
-xcopy.jpg  
My System SpecsSystem Spec
23 Feb 2012   #10
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

Hi,

Can you confirm that you can run xcopy from your wife's PC to the NAS?

Regards,
Golden
My System SpecsSystem Spec
Reply

 Xcopy cannot create directory




Thread Tools





Similar help and support threads
Thread Forum
Is it possible to Create a Symbolic Link to a Non-Specific Directory?
Hi there I was wondering if I can create a symbolic link to a folder location that changes???? Eg. %APPDATA%/
General Discussion
windows 7, GNS3 0.8.2; Error "can't create directory; access denied"
I get error "can't create directory C:\Program Files\GNS3\PROJECTS\test123" : access denied. this is when i click on "new blank project" so GNS3 tries to create new folder "test123" in the path mentioned in 1st line here. how to get it resolved so that GNS3 can create directory when I click on new...
Software
Symlinker - Create Symlink, Hardlinks, And Directory Junctions via GUI
This simplified GUI could be very helpful to those who prefer it over the command line. symlinker: Create Symlink, Hardlink, And Directory Junction In Windows
Software
Create a directory on startup with date i.e. 12-03-2012
Hi there, I would like to create a daily folder on system startup which has the date like this 12-03-2012 I also want it to go to a certain place on my hard drive C:Users/Name/My Documents I have this script but it puts the date the wrong way around and I would prefer dashes in between the...
Backup and Restore
Need xcopy script help
I'm looking for a script that will allow me to copy and "overwrite" all files with a date and time stamp BEFORE a certain date. The source files will NOT be deleted and all permissions will stay the same in destination directories. Copy does include subfolders as well. Any ideas?
General Discussion
Replace files in multiple directory, from a single directory
I have a 10 files that have all been categorised into about 40 folders. These files have been damaged. I have a backup of all these files, but they are not categorised and sit in a single directory. Does anyone know of an easy technique to batch replace the damaged files with the originals? ...
General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 10:20.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App