SetCurrentDirectory(Path: String);
Path - directory that is specified as a working directory of an application.
The SetCurrentDirectory method changes a working directory for an application.
Sub UserProc(sPath: String);
Begin
If Directory.Exists(sPath) Then
Directory.SetCurrentDirectory(sPath);
End If;
End Sub UserProc;
On executing the example it is checked if the directory specified in the sPath parameter is present in the file system. If the directory exists, it is assigned as a working directory for the current application.
See also: