1

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.

2
  • Have you added a /Y to allow overwriting the destination directory? Otherwise, I've had better luck with xcopy E:\Images*.* Z:\Images*.* /D /E /Y Jan 17, 2012 at 20:43
  • 2
    Have you tried robocopy instead of xcopy?
    – jftuga
    Jan 17, 2012 at 20:43

2 Answers 2

3
+100

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.

1
  • This is exactly what I wanted. I also added the /XD option to exclude Subversion files. /XD _svn /XD .svn
    – jmacinnes
    Jan 23, 2012 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .