Contents Previous Next Subchapters

Getting And Setting The Current Working Directory
Syntax cwd
See Also isdir , listdir , mkdir

If directory is not present, returns the current working directory as a character row vector. If directory is present, changes the current working directory to the one specified, where directory is a character row vector. In this case, the return value of cwd is true if the directory change is successful and false if the change fails.

If your current working directory is C:\OMWIN, and you enter
O-Matrix will respond
If you then enter
O-Matrix will respond
and will set your current working directory to C:\OMWIN\PROGRAMS. If you try to change to a directory that does not exist, such as C:\PMWINK, by entering
O-Matrix will respond