This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

removePath

(Not recommended) Remove folder from project path

simulinkproject is not recommended. Use currentProject or openProject instead. For more information, see Compatibility Considerations.

Syntax

removePath(project, folder)

Description

example

removePath(project, folder) removes a folder in a project from the current project path. The folder must be in the project.

Examples

collapse all

sldemo_slproject_airframe;
project = simulinkproject; 

Create a new folder.

 folderpath = fullfile(project.RootFolder,'folder');
 mkdir(filepath);

Add this new folder to the project.

 projectFile = addFile(project,folderpath); 

Add the new folder to the project path.

folderpath = addPath(project,folderpath);

Remove the new folder from the project path.

removePath(project,folderpath)

Input Arguments

collapse all

Project, specified as a project object. Use simulinkproject to create a project object to manipulate a project at the command line.

Path of the folder to remove relative to the project root folder, specified as a character vector. The folder must be within the root folder.

Example: models/myfolder

Compatibility Considerations

expand all

Not recommended starting in R2019a

Introduced in R2017a