Match folder names with file names and rename the folder

5 views (last 30 days)
I have a path folder names as follows:
~/directory/2000/land/cities/Muscat/
~/directory/2000/land/cities/Riyadh/
..... 1000 fodler names
and a file names in a separate directory as
~/dir/2000/cities/453_Muscat/
~/dir/2000/cities/12_Riyadh/
I want to rename the foldername by matching the name of the files., eg,
the folder names desired are
~/directory/2000/land/cities/453_Muscat/
~/directory/2000/land/cities/12_Riyadh/
..... 1000 fodler names
Any help is much appreciated

Answers (0)

Categories

Find more on Search Path in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!