SetCurrentDirectory(Path: String);
Path - a 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;
While executing this example it is checked whether directory, specified in the parameter sPath, is present in file system. If a directory exists, it is assigned as a working directory for a current application.
See also: