delete
Delete files or objects
Syntax
Description
delete
deletes
filename
filename
from disk, without requesting verification.
By default, the specified file is permanently deleted. To change whether the file
is permanently deleted or sent to the recycle folder, go to the
Home tab, and in the Environment
section, click Preferences. Select MATLAB > General and in the Deleting files section, select from
the available options. Alternatively, you can use the recycle
function.
When file recycling is on, the delete
function moves deleted
files to a location specific to the platform:
Windows® — Recycle bin
macOS — Trash
Linux® platforms — Subfolder with the prefix
MATLAB_Files_
in the system temporary folder, as returned by thetempdir
function
Note
On macOS, file recycling is not applied to files deleted from network drives.