| Command group | Flag affected | Reversible | Execute on client | Platform(s) |
| External commands | YES | NO | NO | Windows,Linux |
Note: The flag is set according to whether Omnis was able to make a call to this external command.
This command moves the file specified in from-path to the folder named in to-path. It returns an error code (values are listed at the end of this Appendix), or zero if no error occurs. The to-path is the path to destination folder into which the file will be moved. The command may fail if the to-path directory contains a file with the same name as from-path filename.
Move file cannot move a file across volumes (disks). Use Copy file and Delete file instead. Move file cannot move directories.
# Prompt the user for a file to move together with a path# to move to and move the file
DoFileOps.$putfilename(lPathname,'Select a file for moving','')ReturnslReturnFlag
IflReturnFlagDoFileOps.$selectdirectory(lNewPath,'Path to move to')ReturnslReturnFlagIflReturnFlagMove file(lPathname,lNewPath)ReturnslErrCodeEnd If
End If