Is this expected to move the whole folder (subfolders and files) to the destination? I would like it to, but it didn’t seem to work that way. It only copied the sourceFolder to the destination and left the original with subfolders and files at the source location.
No comments? OK, I guess I will do the directory crawl and move thing. If anyone has any time saving ideas that leverage .MoveFileTo, please let me know.
First thing I will do is see if .CopyFileTo copies the whole directory structure, to make that part easier than copying each file and sub-directory one-by-one.
[quote=227167:@Mark Pastor]No comments? OK, I guess I will do the directory crawl and move thing. If anyone has any time saving ideas that leverage .MoveFileTo, please let me know.
First thing I will do is see if .CopyFileTo copies the whole directory structure, to make that part easier than copying each file and sub-directory one-by-one.[/quote]
According to the classic documentation for FolderItem.CopyFileTo:
If Destination is a folder, then the folder and its contents are copied into Destination.
If Destination is a file and the file already exists, the copy is aborted. You need to delete the existing file first. If there is an error, the LastErrorCode property contains an error code.
If Windows behaves differently than OS X, then there needs to be a really huge note in the documentation about this.