Contents Previous Next Subchapters

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

Description
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.

Example
If your current working directory is C:\OMWIN, and you enter
     cwd
O-Matrix will respond
     C:\OMWIN
If you then enter
     cwd("programs")
O-Matrix will respond
     T
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
     cwd("c:\pmwink")
O-Matrix will respond
     F