Development Environment | ![]() ![]() |
Creating, Renaming, Copying, and Removing Directories and Files
If you have write permission, you can create, copy, remove, and rename MATLAB related files and directories for the directory shown in the Current Directory browser. If you do not have write permission, you can still copy files and directories to another directory.
Creating New Files
To create a new file in the current directory:
An icon for that file type, for example an M-file icon , with the default name
Untitled
appears at the end of the list of files shown in the Current Directory browser.
Create New Directories
To create a new directory in the current directory:
An icon, with the default name NewFolder
appears at the end of the list of files shown in the Current Directory browser.
NewFolder
with the name you want to give to the new directory.Function Equivalent. To create a directory, use the mkdir
function. For example,
mkdir ..\testdata newdir
creates the directory newdir
within the directory testdata
.
Renaming Files and Directories
To rename a file or directory, select the item, right-click, and select Rename from the context menu. Type over the existing name with the new name for the file or directory, and press the Enter or Return key. The file or directory is renamed.
Cutting or Deleting Files and Directories
To cut or delete files and directories:
The files and directories are removed.
Function Equivalent. To delete a file, use the delete
function. For example,
delete('d:\mymfiles\testfun.m')
Copying and Pasting Files
You can copy and paste files, but not directories. To copy and paste files:
![]() | Changing the Display | Opening, Running, and Viewing the Content of Files | ![]() |