|MATLAB Function Reference|
As an alternative to the
rmdir function, use the delete feature in the Current Directory browser.
removes the directory
dirname from the current directory. If the directory is not empty, you must use the
s argument. If
dirname is not in the current directory, specify the relative path to the current directory or the full path for
rmdir('dirname',' removes the directory
dirname and its contents from the current directory. This removes all subdirectories and files in the current directory regardless of their write permissions.
[status, message, messageid] = rmdir('dirname',' removes the directory
dirname and its contents from the current directory, returning the status, a message, and the MATLAB error message ID (see
1 for success and is
0 for no error, and
messageid, and the
s input argument are optional.
Remove Empty Directory
myfiles from the current directory, where
myfiles is empty, type
If the current directory is
myfiles is in
d:/matlabr13/work/project/, use the relative path to
or the full path to
Remove Directory and All Contents
myfiles, its subdirectories, and all files in the directories, assuming
myfiles is in the current directory, type
Remove Directory and Return Results
myfiles from the current directory, type
indicating the directory
myfiles is not empty.
myfiles and its contents, run
and MATLAB returns
myfiles and its contents were removed.