chdir

Changes the current directory to dir.

Syntax

chdir(dir)

R = chdir(dir)

Inputs

dir
String specifying a directory path.
Type: string

Outputs

R
Returns a string specifying the current directory path if the directory change is successful.
Does not return a value if the directory change is unsuccessful.
Type: string

Example

Simple chdir example.

chdir('C:/')