Main Content

File Operations

Find, view, and change files and folders

Use file operation functions to get information about files, manage files and folders, and open specified files. For more information, see Manage Files and Folders.

Functions

expand all

dirList folder contents
lsList folder contents
pwdIdentify current folder
fileattribSet or get attributes of file or folder
existCheck existence of variable, script, function, folder, or class
isfileDetermine if input is file
isfolderDetermine if input is folder
isSymbolicLinkDetermine if input is symbolic link (Since R2024b)
typeDisplay contents of file
visdiffCompare two files or folders
whatList MATLAB files in folder
whichLocate functions and files
filebrowserManage files and folders in MATLAB
cdChange current folder
copyfileCopy file or folder
createSymbolicLinkCreate symbolic link (Since R2024b)
deleteDelete files or objects
recycleSet option to move deleted files to recycle folder
mkdirMake new folder
movefileMove or rename file or folder
rmdirRemove folder
openOpen file in appropriate application
winopenOpen file in appropriate application (Windows)

Functions

filePermissionsView and edit file, folder, and symbolic link permissions (Since R2025a)
getPermissionsGet individual permissions (Since R2025a)
setPermissionsSet individual permissions (Since R2025a)

Objects

WindowsPermissionsPermissions of file, folder, or symbolic link in Windows (Since R2025a)
UnixPermissionsPermissions of file, folder, or symbolic link in UNIX (Since R2025a)
CloudPermissionsPermissions of file or folder in remote location (Since R2025a)
FileSystemEntryPermissions Permissions of files, folders, or symbolic links on different systems (Since R2025a)

Topics