Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
status = %SYN_SETDIR(path)
One of the following values: (n)
1 = Successful
0 = Not successful
The path for the directory you want to set as the current directory. (a)
%SYN_SETDIR does not support relative paths (for example, ..\) or logicals.
On Windows, although changing a directory to a UNC path is valid, doing so restricts you from subsequently spawning any command that uses the command interpreter cmd.exe, because cmd does not support a default directory of anything other than a mapped or subst drive. For example, you would not be able to spawn (or do an open pipe) of a dir command or spawn a .bat command procedure.
If %SYN_SETDIR is not successful, the system error code can be retrieved using %SYSERR.
This example sets the current directory path to C:\mydir.
record sts ,i4 proc sts = %syn_setdir("C:\mydir") if (.not. sts)
writes(1, "cannot change to required directory")