I seem to have discovered a problem with the copy /w switch when the source is an ftp: path. I am trying to synchronize a local copy of a directory structure from a Western Digital NAS (ShareSpace model WDA4NC2000). Up until version 11 came out I used a command like:
copy ftp:/MSCR Y:\MSCR\Current\MSCR /u/s/ne
This worked fine (and still does with version 11) except it doesn't delete any files in the local copy (Y:) that no long exist on the NAS. When version 11 came out I added the /w switch, like:
copy ftp:/MSCR Y:\MSCR\Current\MSCR /u/w/s/ne
This command now deletes any local files (Y:) that were deleted on the NAS which is what I expected.
The problem is that the copy command initially deletes all of the files in the Y:\MSCR\Current\MSCR directory and then copies all of the files in the ftp:/MSCR directory to the Y:\MSCR\Current\MSCR directory. It also does this from some of the sub-directories (but not all of them).
If I remove the /w switch from the copy command, only the changed files will be copied, which most of the time is none of the files. I also discovered while trying to understand the problem, if I perform a "cd ftp:/MSCR" before performing the copy command, it works correctly (i.e. only coping changed files and deleting missing files).
The other issue is that the /w switch seems to cause the copy command to take about three times longer to execute when there are no changes (total of 1200 files in 494 directories).
copy ftp:/MSCR Y:\MSCR\Current\MSCR /u/s/ne
This worked fine (and still does with version 11) except it doesn't delete any files in the local copy (Y:) that no long exist on the NAS. When version 11 came out I added the /w switch, like:
copy ftp:/MSCR Y:\MSCR\Current\MSCR /u/w/s/ne
This command now deletes any local files (Y:) that were deleted on the NAS which is what I expected.
The problem is that the copy command initially deletes all of the files in the Y:\MSCR\Current\MSCR directory and then copies all of the files in the ftp:/MSCR directory to the Y:\MSCR\Current\MSCR directory. It also does this from some of the sub-directories (but not all of them).
If I remove the /w switch from the copy command, only the changed files will be copied, which most of the time is none of the files. I also discovered while trying to understand the problem, if I perform a "cd ftp:/MSCR" before performing the copy command, it works correctly (i.e. only coping changed files and deleting missing files).
The other issue is that the /w switch seems to cause the copy command to take about three times longer to execute when there are no changes (total of 1200 files in 494 directories).