获取当前文件夹下全部文件名称
clc,clear, close allwarning off
FilePath='./';
fileList = dir(FilePath);
savePath='./';
fid=fopen( ,'wt'); % 打开文件
for i=1:length(fileList)
if strcmp(fileList(i).name,'.')==1||strcmp(fileList(i).name,'..')==1
continue;
else
fileList(i).name;
fprintf(fid, fileList(i).name);% 输入数据
fprintf(fid,'\n');
end
end
fclose(fid); %关闭文件
页:
[1]