I have a list of files where the file name is "851113_Mail_132013_11886808.pdf" and need to rename it to "851113.pdf". I have found a couple other codes, but nothing seems to work. I have even tried a work around of delimiting the column by _, copy pasting column a into column B and using the below code
However, even with the correct file name "851113.pdf" in Column B and "851113_Mail_132013_11886808.pdf" in Column A, it claims file not found... This would have to be the "workaround method where I have macros running to pull out the first set of numbers and add on ".pdf", but even this code isn't working.Please Login or Register to view this content.
Optimally, I would like a code in one to read just up to the _ and rename the files in the folder as the first 6-10 digits.
I haven't worked with pulling out the beginning of a string before in vba...only excel and SAS.
Any assistance would be greatly appreciated.
Bookmarks