removeFile

Remove file from Simulink Project

Syntax

Description

example

removeFile(proj,file) removes a file from the project proj.

Examples

expand all

Remove File from Project

Open the airframe project and create a project object.

sldemo_slproject_airframe;
proj = simulinkproject;

Remove a file.

removeFile(proj,'models/AnalogControl.mdl')

Add the file back to the project.

addFile(proj,'models/AnalogControl.mdl')

Input Arguments

expand all

proj — Projectproject object

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

file — Path of filestring | file object

Path of the file to remove relative to the project root folder, including the file extension, specified as a string or a file object returned by findFile. The file must be within the root folder.

Example: 'models/myModelName.slx'

See Also

Functions

Was this topic helpful?