函数
movefile
移动或重命名文件或文件夹
movefile source destination
copyfile
复制文件或文件夹
copyfile source destination
代码
tic
bar = waitbar(0,"数据移动中...")
for i=2016009:8:2016361
str = num2str(i);
spath = ['D:\DATA\GPP\MOD17A2\1HDF\2016\','*',str,'*.tif'];
dpath =['D:\DATA\GPP\MOD17A2\1HDF\2016\tif\',str];
movefile(spath,dpath);
waitbar((i-2016008)/(2016361-2016008),bar);
end
toc
来源:CSDN
作者:王永琳
链接:https://blog.csdn.net/weixin_43465015/article/details/104297199