| Function group | Execute on client | Platform(s) |
| FileOps | NO | All |
FileOps.$changeworkingdir(cPath)
Changes the current working directory to the directory named in cPath.
$changeworkingdir() only switches between directories on the same drive, not between drives. The function returns an error code, or zero if successful: see the FileOps function error codes.
Note: Applications on macOS do not have a working directory. If you use this function on macOS, it returns the error code kFileOpsNoOperation.
Switchplatform(()Case'X'## for Mac OSXQuit method## working directories not supportedCase'U'## for LinuxDoFileOps.$changeworkingdir('/omnis/examples')ReturnslErrorDefault## for Windows platformsDoFileOps.$changeworkingdir('c:\omnis\examples')ReturnslError
End Switch
OK message{Working directory is now: [FileOps.$getworkingdir()]}