Go to: Return value. Related commands. Examples.

Synopsis

chdir <string>

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 commands

pwd, workspace

Examples

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