• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Renaming folders in path with vba excel

JayPeter

New Member
Hello All,

Could someone help me to rename the folders which are available in different paths using VBA.

Like:
In Column "A" i have the list of folder paths like "C:\2017weeks and C:\2016weeks etc."

In Column "B" i have the list of old folders to be renamed like "2016week01 and 2016week02 etc."

In Column "C" i have the list of new folders to be renamed like "2017week01 and 2017week02 etc."

Thank you in advance!
 
Hi @JayPeter

You can use
Code:
Name "C:\2017weeks\OriginalFolderName" As "C:\2017weeks\2016week01"

to rename folders... it is just a matter of iterating through every folder and changing the names.

Now, without knowing which folder should be renamed to which name it is hard to provide further code.

Hope it helps
 
Back
Top