Hi,
I am new to MATLAB, so please bear with me. I am currently trying to loop through folders and rename subfolders within them. The code below seems to work if the name of the subfolder is same in each folder, but I am not sure how to rename subfolders that are named differently. Any suggestions?
The code I use is:
cd ('D:\ToM_3_LEVEL1_ONLY');
for n=1:9
cd (['ToM_00', sprintf('%d',n)]);
movefile (['ANALYSYS_DT_REG_P000_24_05_2019'], ['24_05_19_ANALYSYS_DT_REG_P00', sprintf('%d',n)]);
cd ../..
end
2 件のコメント
Guillaume (view profile)
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/463904-renaming-folders-with-different-names#comment_708517
Eva Balgova (view profile)
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/463904-renaming-folders-with-different-names#comment_708520
サインイン to comment.