2.14.2.1 cd

Brief Information

Change or show working directory

Additional Information

X-Function not designed for Auto GetN Dialog.

Command Line Usage

1. cd;

2. cd newpath:=c:\c\proj1;

3. cd newpath:="c:\my proj-1";

4. cd result:=aa;

5. cd newpath:="c:\my proj1" result:=aa;

6. cd newpath:="" result:=aa;

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
newpath

Input

string

<unassigned>

This folder will become the new working directory.

Double quotes are required if the path has a space or dash in it.

To clear working directory, use empty path in double quotes "".

If newfolder is not defined, the current working folder is displayed and refreshed.

result

Output

string

<optional>

Outputs the working directory into a string variable.

cd result:=aa puts working directory into variable aa$.

aa$ now stores the working directory.

Description

This X-Function is used to change or show working directory

Examples

To refresh and show working directory, use the following command:

cd

To set c:\c\proj1 as working directory, use the following command:

cd c:\c\proj1

To use quotes if path has space or dash, use the following command:

cd "c:\my proj-1"

To get the working directory into string variable aa$, use the following command:

cd result:=aa

To set working directory and get it into string variable aa$, use the following command:

cd "c:\my proj1" aa

To set working directory to empty, and also set aa$ to empty, use the following command:

cd "" aa

Related X-Functions

dir, cdset