Saving all tabs into a folder
9 ビュー (過去 30 日間)
古いコメントを表示
This question is about the interface. I would like to save all my Matlab script tabs into a folder. Is there any quick way to do that? Unfortunately, I cannot save them one by one since I do have 100+ scripts.
Thanks.
4 件のコメント
Rik
2023 年 4 月 22 日
Are you using the words script and function interchangeably? Because 100+ scripts is very likely to be a sign of terrible design. You should use functions to make sure you have a stable interface that you can document and can improve in isolation.
採用された回答
Walter Roberson
2023 年 4 月 22 日
targetdir = 'DirectoryToSaveInto';
if ~isdir(targetdir); mkdir(targetdir); end
X = matlab.desktop.editor.getAll;
newnames = fullfile(targetdir, {X.Filename}.');
arrayfun(@(Info, NewName) Info.saveAS(NewName), X, newnames)
You might need to 'Uniform', 0. You might possibly need to loop. And you might possibly need to deal specially with untitled
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Adding custom doc についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!