Read filenames from folder A and rename files from folder B as filenames if folder A
Afficher commentaires plus anciens
Hi, I would like to rename files (more than 600) in a folder. Particularly read the file names from folder A and rename the files from folder B as folder A file-names. I tried to use movefile, but did not work.
for i = 1:Num;
% read filename from folder A
tempA = ReadHis(filesA(i).name); % read his file
fprintf(1,'File read %s\n',filesA(i).name); %Matlab read the files name wise
filenameA = filesA(i).name
% read filename from folder B (old)
tempB = ReadHis(filesB(i).name); % read his file
fprintf(1,'File read %s\n',filesB(i).name); %Matlab read the files name wise
filenameB = filesB(i).name
movefile(filenameB,filenameA);
end
??? Error using ==> movefile No matching files were found.
Any help or suggestion will be appreciable.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!