IDirectory.SetCurrentDirectory

Syntax

SetCurrentDirectory(Path: String);

Parameters

Path - directory that is specified as a working directory of an application.

Description

The SetCurrentDirectory method changes a working directory for an application.

Example

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:

IDirectory