ISDIRECTORY True if argument is a directory. ISDIRECTORY(DIR) returns 1 if DIR is a directory and 0 otherwise. [T, NEWDIR] = ISDIRECTORY(DIR) also returns the name of the directory as returned by CD. NEWDIR is empty if DIR is not a directory. Using EXIST(DIR, 'dir') is too unreliable. For instance, under Windows it returns false if DIR is 'c:' (where c: is an existing drive) and it returns false and if DIR is a directory which is in the path but does not exist.