Error 105 on FolderItem.MoveFileTo

I’m moving a bunch of files using FolderItem.MoveFileTo. The files are all smallish (700 KB) JPEGs.

On one of them, I get an error 105, which means “You used an Invalid name”

Except the name WASN’T invalid, it was “CHW_IMG_0245.jpg”
AND the file WAS moved. Actually, it was copied; the original file still exists.

This is happening to a couple of files out of 100 or so. There’s no pattern that I can discern.

Any suggestions about what’s going on?

Xojo 2017r2.1, macOS 10.12.6

Thanks!

You can get an invalid name error if any part of the path happens to be invalid, perhaps it’s not the actual filename but somewhere else in the path?

No, the paths are all normal.

I got around the problem by using a Shell mv command instead.

No other solutions, for this? lately I get random errors and more and more customers complaining about this error in the app, no idea how and why, we tried to reproduce on our side and we cannot but they start to get this error more frequent lately .

I guess I will try to copy and if the copy is successful then delete the origin. some double work but I will have to see if it’s better than moving it around .

Thanks.

isn’t it a access permission problem on the folder containing the file ?

Not that I know of, and if before was doing only when I was moving files on a smb connection, now it does it as well on the same drive so local, that is the weird part.

I will try to refactor the moving part and copy it instead, do the checksum and if it matches then delete the source , maybe that will help .

Check the encoding on the names of the files. It may be that they are different on the ones that are failing.

Did you check if it was a Mac alias or a Windows shortcut ? Or even a Unix symbolic link on Mac ? That would do that.