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.
Best Answer