Set Directory

See Also: File I/O Commands, File_Exist, Make_Directory, Make_Temp_File, Remove_Directory, Valid_Drive

Purpose

To set the current working folder.

Syntax

Set_Directory {sVariable}

What It Does

Set_Directory sets the current working folder in variable sVariable.

 

Example

This example shows how to set the current directory to a folder after checking that the provided folder exists.

Procedure ChangeCurrentFolder

    String sFolderName

    Boolean bExists

    

    // Retrieve a folder name from a Form or other control

    Get Value of oFolderName to sFolderName

    File_Exist sFolderName bFolderExists

    If (bFolderExists) Begin

        Set_Directory sFolderName

    End

End_Procedure

 

Send ChangeCurrentFolder

 

Notes