matlab拷贝文件夹及其子文件和子文件内容
% 清空 close all; clear; clc; % 选择文件路径(复制某文件夹下部分文件夹到其他路径) % folder = uigetdir('D:\qcc\123','请选择文件夹'); folder='D:\qcc\123'; % image0 image0Folder=[folder '\image0']; % image0File=dir(fullfile(image0Folder,'*.png')); image0File=dir(folder); count=length(image0File); filefolder=33782141; % 遍历image0 for i = 1:24 % name = image0File(i).name; image0Path = [folder,'\','.']; copyfile(image0Path,['D:\qcc\123\cad\',num2str(filefolder+i)]); %%复制前地址,复制后地址 end