addShutdownFile - Add shutdown file to project - MATLAB (original) (raw)
Main Content
Add shutdown file to project
Syntax
Description
addShutdownFile([proj](#mw%5Ff0c58ce1-df38-49f8-8fc5-b82261c13064),[files](#mw%5F4b1e8453-ca55-49f0-9354-bec47238db20))
adds shutdown files to the specified project. When you close the project, the project runs the shutdown files automatically.
Examples
Open the Times Table App project. Use currentProject
to create a project object from the currently loaded project.
openExample("matlab/TimesTableProjectExample") proj = currentProject;
Specify executable MATLABĀ® code to run as the project shuts down. Automatically run the file when the project closes, by making it a shutdown file.
filepath = fullfile("utilities","runTheseTests.m"); addShutdownFile(proj,filepath);
Input Arguments
Project, specified as a matlab.project.Project
object. Use currentProject to create a project object from the currently loaded project.
Path of the shortcut file, including the file extension, specified as a string array or a cell array of character vectors. The files must be within the project root folder. If the file is not a project file, the function adds it to the project.
Version History
Introduced in R2019a
Starting in R2025a, the addShutdownFile
function supports adding multiple shutdown files in one step.