IDirectory.SetCurrentDirectory

Syntax

SetCurrentDirectory(Path: String);

Parameters

Path - a 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;

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:

IDirectory