|  | 
 
| 复制代码clc,clear, close all
warning off
FilePath='./';
fileList = dir(FilePath);
savePath='./';
fid=fopen( [savePath, 'fileListName.txt'],'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); %关闭文件
 
 | 
 |