Add folders and subfolders to projrct through script
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I want to Add folders and subfolders to project through script. Please five me matlab commands to do so.
1 Kommentar
Antworten (1)
Andrew Newell
am 16 Mär. 2015
2 Kommentare
Andrew Newell
am 16 Mär. 2015
Sorry, I misunderstood your question. I don't have any experience with projects, but this might work (for the full path name of your folder):
fileTree = genpath(full_path_name);
proj=slproject.getcurrentproject;
filenames = textscan(fileTree,'%s','Delimiter',':');
for ii=1:length(filenames)
proj.addfiles(filenames{ii});
end
The idea is to use genpath and textscan to create a cell array of the names of your folder and subfolders, and then to add them one at a time. However, it may not add the files that are in those folders.
Siehe auch
Kategorien
Mehr zu File Operations finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!