Go to: Synopsis. Return value. Related. MEL examples.

Synopsis

chdir <string>

chdir is undoable, queryable, and editable.

Causes the directory represented by the string argument to be the current working directory. An integer value of 0 is returned if the command was successful, and -1 otherwise.

See also the unix function "chdir".

Return value


int

Related

pwd, workspace

MEL examples

chdir "/h/userName/maya/";
// Result: 0 //
chdir "..";
// Result: 0 //
pwd;
// Result: /h/userName //
chdir "fdsaf";
// Result: -1 //