码迷,mamicode.com
首页 > 其他好文 > 详细

matlab 读多个文件夹(有名字规律)中的文件名字保存到txt中

时间:2015-10-24 21:49:34      阅读:138      评论:0      收藏:0      [点我收藏+]

标签:

save_file_name=C:\Users\cong\Desktop\研一实战\项目\图像中时间数字识别\OCR\result6\‘;
for j=0:1:9
    image_path=strcat(C:\Users\cong\Desktop\研一实战\项目\图像中时间数字识别\trainingSample\num,num2str(j),\‘);
    file=dir(image_path);%%%%%%    
    txtname=strcat(result,num2str(j),.txt);    
    for i=3:length(file)
         path= strcat(image_path,file(i).name);%%%%%%
         fid=fopen([save_file_name,txtname],a);%%%%%
         fprintf(fid,%s\n,path);
         fclose(all);
    end    
end

 

matlab 读多个文件夹(有名字规律)中的文件名字保存到txt中

标签:

原文地址:http://www.cnblogs.com/Wanggcong/p/4907626.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!