Hello Everyone,
I have a macro that renames files based on the value in cell B3, and I'm running into an issue with file names sometimes coming up with the same value. When it reaches a point where it ends up renaming a file the same as another file the macro gets an error. Does anybody know of a way to make the macro add a (1) at the end of a file name if another file already has that name it is attempting to rename it to? Or if that isn't possible, if it could just skip that file and rename all the rest that would work as well, since manually renaming one or two files wouldn't be too difficult.
Edit: It appears when it runs into this error it also deletes one of the files that would've had a duplicate name, and then returns the error.
Please Login or Register to view this content.
Bookmarks