AnsweredAssumed Answered

Macro to rename files according to excel cells

Question asked by Andy Zhou on Nov 30, 2016
Latest reply on Feb 19, 2017 by Deepak Gupta

Hi guys,


I'm in need of your help in creating a macro to rename files which contains hundreds of Assembly, Parts, Drawings; off an excel spread sheet. In the spread sheet, the first column would contain the current file names of all Assembly, Parts and Drawings. The second column would contain the new names for the corresponding row. Like shown below in the picture.



Regardless of the file extension, just replacing the old name with the new one while keeping all the references.

I'm thinking it will have to use the PackandGo macro and make it search through the folder for the Old Name and replace it with the New Name of the next column. (eg. make it search for 'A1234' in the folder then replace it with 'C4567', then move on to search for 'A1235' so on.


So my question is that, I'm not sure how to pull values from excel sheet; then search through the folder and replace it with another value from excel cell. Does anyone have an idea?


Any help would be appreciated. Thank you.