博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
matlab创建文件夹与批量移动文件到单一文件夹或者各自文件夹
阅读量:3906 次
发布时间:2019-05-23

本文共 527 字,大约阅读时间需要 1 分钟。

代码备份自用的,可参考movefile 函数

clear  clc  cd('C:\EO');%设置当前目录:current directory    for i = 1 : 47      folderName{i} = ['sub_', num2str(i)];       mkdir(folderName{i});  % 新建一个文件夹   end  eval(['load ',prefix_common,'_ec_fft_stsp_sub_',num2str(i,'%03d'),'.mat;']);a='C:\EO';b='C:\EO';for k = 24:47%     b=num2str(k,'%3d');%     a=[sourcePath,'\','N_EC_1_Sub_',num2str(k,'%03d'),'.nii'];    targetPath=[a,'\','sub_',num2str(k,'%01d')];    sourcePath=[b,'\','N_EO_Sub_',num2str(k+1,'%03d'),'.nii'];    movefile(sourcePath,targetPath);end

转载地址:http://famen.baihongyu.com/

你可能感兴趣的文章
Bloom Filter - Math deduce
查看>>
Bit Byte Megabyte Gigabyte
查看>>
Bits Bytes and Words
查看>>
Python yield and generator
查看>>
Python yield and iterables
查看>>
Python string find
查看>>
del Statement
查看>>
Python Dict all
查看>>
Python Rate Limiter
查看>>
Python list to string
查看>>
Python list dict iteration
查看>>
Linux basic knowledge
查看>>
Difference Between Hard & Soft Links
查看>>
Linux Hard link and Symbolic link
查看>>
Hard Link Vs Soft Link
查看>>
redis brief intro
查看>>
mongo db brief intro
查看>>
Kafka basic intro
查看>>
Python multiprocessing
查看>>
Python urlib vs urlib2
查看>>