0

I am trying to synchronize two folders. I am trying to synch a WebDAV mapped drive folder (Z:\Images) with a folder on a hard drive on my local computer (E:).

Here is the command I am running:

xcopy E:\Images Z:\Images /D /E

Here is the error message I get:

File creation error - The directory is not empty.

Unable to create directory - Z:\images
0 File(s) copied

I can use xcopy to copy from a local folder to an empty directory on the WebDAV drive.

The WebDAV drive works perfectly find when trying to access or modify via Windows Explorer. Also, the xcopy command works fine when using two local folders or when the remote directory is actually empty.

Source machine is a Windows 7 machine and destination machine is a Windows Server 2008 machine.

Skyhawk
  • 14,149
  • 3
  • 52
  • 95
jmacinnes
  • 5
  • 1
  • 5

2 Answers2

2

Are you trying to "mirror" the E: drive, meaning if you add/delete a file in E: you want it added/deleted in Z:? If so, robocopy would be your best bet.

The command would basically look like this: robocopy E:\Images Z:\Images /mir

If you need to mirror the ACLs, you could add /copyall as well.

Skyhawk
  • 14,149
  • 3
  • 52
  • 95
Eric C. Singer
  • 2,319
  • 15
  • 17
  • This is exactly what I wanted. I also added the /XD option to exclude Subversion files. /XD _svn /XD .svn – jmacinnes Jan 23 '12 at 23:31
1
  1. Have you added a /Y to allow overwriting the destination directory? I've had better luck with: xcopy E:\Images*.* Z:\Images*.* /D /E /Y

  2. The account under which you are running xcopy may not have permission to delete the folder/files on the remote server. Check permissions on the server.

Skyhawk
  • 14,149
  • 3
  • 52
  • 95
Paul Ackerman
  • 2,729
  • 15
  • 23