If you are attempting to move a document using the MOVE DOCUMENT command and are getting an error -48, it should be for the following reason: although it is not mentioned in the documentation, you need to delete existing documents that are located in the target folder and have the same name as the one you are copying. This can be done using the DELETE DOCUMENT command.
The following code lets you choose a document, moves it to the location you select and also manages potential conflicts between filenames (for both Mac OS and Windows).
ALERT("Please select document to move!")
$Path:=Select folder("Please select target folder !")
$CheckPath:=Test path name($TargetDoc)
CONFIRM("That file already exists, do you still want to proceed?")
CONFIRM("That file name is used by a folder, do you still want to proceed?")
`it will delete it only if there are no file in that folder
In this code a subroutine is used (Retrieve_Docname) to isolate the actual name of the document. It uses the following code.`Retrieve_Docname subroutine