View Full Version : VBA code to rename folders

12-19-2016, 03:20 AM

What I want to do is list down all the folder and sub folder names in 1st column of excel, then rename it with names present in the second column of the excel sheet.

Any help would be appreciated.

Kenneth Hobs
12-19-2016, 06:19 AM
Welcome to the forum!

Please post example values in A2 and B2.

Would B2's path already exist?

12-20-2016, 02:13 AM
Thanks kenneth !

Example: A2 has folder name "Behavioural_Models"
B2 has folder name "Models"

so replacing A2 by B2.

Also could you help if I have to rename folder inside a folder?


Kenneth Hobs
12-20-2016, 06:28 AM
I feared as much. That is not explicit enough. I need the drive and path before those "folder" names. It is like saying, meet me at 1313 Mockingbird Lane.

Also, you did not answer:

Would B2's path already exist?