• 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.

macro to rename all the files in a folder

Marco1975

New Member
hi , I could use a macro to rename all the files in a folder. In excel sheet in column "A" are the names of the files to be renamed and in the column "G" are the names to be assigned. The folder where the files are stored is always different and therefore has to be selected at the time . I hope someone can give me a hand. I attach excel file as example. Thank you.
 

Attachments

  • file_rename.xlsm
    11.8 KB · Views: 6
Hi Marco,

Sorry but my english is not very good...
There is two problems :
• We need the complete path of each file
• you can rename a file with the character ("/")
 

Hi Robert and welcome aboard !

I don't understand your second point : rename a file with the character "/" ?
 
Thanks for reply ThauThème, also my English is not very good .
With regard to the first problem , all files are in the same folder; the problem is that i have to rename several folders , so I thought about using " Application.FileDialog ( msoFileDialogFolderPicker ) " to select the folder .

For the second problem instead of the character " / " you can put " - "
 
Back
Top