removeFile - Remove file or folder from project - MATLAB (original) (raw)

Main Content

Remove file or folder from project

Syntax

Description

removeFile([proj](#mw%5Fe9ee601c-e029-43a7-9d38-cc1abd7e17e4),[filesAndFolders](#mw%5F38d34d18-8255-4974-95eb-b434511f9e1c)) removes files and folders from the specified project.

example

Examples

collapse all

Open the Times Table App project. Use currentProject to create a project object from the currently loaded project.

openExample("matlab/TimesTableProjectExample") proj = currentProject;

Remove a file.

removeFile(proj,"source/timesTableGame.m")

Add the file back to the project.

addFile(proj,"source/timesTableGame.m")

Input Arguments

collapse all

Files or folders to remove, specified as a string array, a cell array of character vectors, or an array of ProjectFile objects.

Version History

Introduced in R2019a

expand all

Starting in R2025a, the removeFile function supports removing multiple folders and files from a project at the same time.