From Xojo Documentation
Contains the error code for the last supported operation on the FolderItem. LastErrorCode will be set for any error.
The following error codes may be returned:
100: Destination does not exist. You will get this error only on CopyFileTo and MoveFileTo.
101: File not found.
102: Access denied
103: Out of memory
104: File in use
105: Invalid name
You can test whether an error occurred by comparing the value in LastErrorCode to one of the Error Constants. See the section "FolderItem Error Constants", in the Notes section.
LastErrorCode may also return operating system-specific error codes if the error does not map to one of the above errors.