checking folder has more than one file with similar name
1 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Voss
2022-9-9
编辑:Voss
2022-9-9
% use the name of the folder you want to check:
folder = './';
% get info about the files in that folder whose name starts with 'test' and
% whose extension is .mat:
files = dir(fullfile(folder,'test*.mat'));
% see the files' names:
{files.name}
% and/or, see if there is more than one such file:
numel(files) > 1
% etc.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Software Development Tools 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!