delete
Delete files or objects
Description
delete deletes
filenamefilename 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
Settings. 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 thetempdirfunction
Note
On macOS, file recycling is not applied to files deleted from network drives.
delete(___,ResolveSymbolicLinks=
specifies whether to delete a symbolic link or remove the target of the symbolic
link. (since R2024b)tf)

