I want help to rename all folders in a root folder with different name using VBA. So that one button click it should happen. In Excel I have all existing folder names in one column and new folder names in another column. Appreciate your help here.
Here is the vba code to rename all folders in root folder form existing name to new name. The below code will loop through all folder names and will update new name.
Sub ReName_Folders() Const sRootFolder As String = "C:\Users\IBM_ADMIN\Desktop\3QWk10\SubBrand Integration\" Dim Old_FolderName As String, New_FolderName As String With Sheets("Settings") For i = 2 To .Range("AE1").End(xlDown).Row Old_FolderName = sRootFolder & Sheets("Settings").Range("AE" & i) New_FolderName = sRootFolder & Sheets("Settings").Range("AF" & i) Name Old_FolderName As New_FolderName Next i End With End Sub
Hope it resolves your requirement