|
Answer» i need to RENAME more than 3000 folders which is available in rout folder C:\Users\anees\Desktop\Trail
based on list in excel file
in my excel file column A have Existing folder NAME and column B have new name which we need to have
kindly help me for writing one VBA
i have the below code but it shows some error
SUB rename_folder() Const FILEPATH As String = "C:\Users\anees\Desktop\Trail" Dim strfile As String Dim filenum As String strfile = Dir(FILEPATH)
Dim old_name, new_name As String For i = 2 To Sheets(1).Range("a1").End(xlDown).Row
strOldDirName = FILEPATH & Sheets(1).Cells(i, 1).Value strNewDirName = FILEPATH & Sheets(1).Cells(i, 3).Value Name strOldDirName As strNewDirName
Next i End Sub
|