FolderItem.MoveFileTo does not work between volume?

This is on Xojo 2014 r2.1 and Windows 7 64bit. I haven’t tested elsewhere.

It seems that FolderItem.MoveFileTo (and presumably) FolderItem.CopyFileTo only works within the same Volume. I get a 102 error when I try to move a folder from my boot drive to a USB drive. My code works if I change the destination to, say, the Specialfolder.Desktop (i.e., the same boot drive). Permissions are not the problem as I can otherwise write directy to the USB drive.

If this is a known limitation, please could the documentation be updated to say so.

Submit a feedback and Paul fixes the documentation rather quickly, if it is something that needs to be corrected and can be reproduced…

Check your app is not sandboxed. I had an issue where the user had to specifically choose the source and destination before copying.

I think it’s an OS limitation. Copy should work cross-volume. Move does not.

Thanks for your responses, guys.

Tim, confirms that it is an OS limitation. The solution would be to Copy the directory to the other volume and then delete the original. I assume that the obvious reason why move only works on the same volume is that the OS simply changes the path information of the directory without having to move any actual data.

I do “move” between volumes all the time in the Finder

It probably does a copy/delete. The mv command doesn’t work cross-volume.