+ Reply to Thread
Results 1 to 16 of 16

Renaming file names in Excel with macros and then applying the renamed file name to folder

  1. #1
    Registered User
    Join Date
    08-02-2012
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    8

    Renaming file names in Excel with macros and then applying the renamed file name to folder

    Hello excel community, i have a project of where i have to rename 7600 files within a folder. I have been able to find a way to create a macros that will extract those file names into Excel, but my problem now is how can i get those renamed files names back into the folder and reflect the name changes???

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Renaming file names in Excel with macros and then applying the renamed file name to fo

    You need to explain some more. I am not able to understand your question.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    08-02-2012
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Renaming file names in Excel with macros and then applying the renamed file name to fo

    ok, i have 7600 pdf files that i need renamed with a file specific name. i used a macros formula in excel to extract the file names into a workable format. i was able to rename them successfully in excel, but i am stuck now on how i can extract those file names from excel back into the original file folder where the 7600 pdf exist. Does this explain a lil better?

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Renaming file names in Excel with macros and then applying the renamed file name to fo

    You can't really. How is Excel supposed to know which of your amended file names relates to the original filename?

  5. #5
    Registered User
    Join Date
    08-02-2012
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Renaming file names in Excel with macros and then applying the renamed file name to fo

    i think there is a way to do it thru DOS, but i am not sure of the process to accomplish that.

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Renaming file names in Excel with macros and then applying the renamed file name to fo

    You haven't answered how you relate the old file names to the new ones. Without that no program will be able to do it

  7. #7
    Registered User
    Join Date
    08-02-2012
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Renaming file names in Excel with macros and then applying the renamed file name to fo

    the old file names are listed as " 99999,smith,john,010111.pdf ", for our upload process i have to remove the commas and replace with spaces, otherwise the file will not upload to our system. i have removed the commas and added the spaces in excel and that is the only changes between the old and new file name. so the file names look like this now, " 99999 smith john 010111.pdf ", does this help clarify

  8. #8
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Renaming file names in Excel with macros and then applying the renamed file name to fo

    I'd just run:
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    08-02-2012
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Renaming file names in Excel with macros and then applying the renamed file name to fo

    thanks, i will try this and see how it works.

    ---------- Post added at 09:20 AM ---------- Previous post was at 09:05 AM ----------

    this gave me a run time error

  10. #10
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Renaming file names in Excel with macros and then applying the renamed file name to fo

    What's the error?

  11. #11
    Registered User
    Join Date
    08-02-2012
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Renaming file names in Excel with macros and then applying the renamed file name to fo

    run-time error '53'
    file not found

  12. #12
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Renaming file names in Excel with macros and then applying the renamed file name to fo

    It's pretty self explanatory, it hasn't found the file. Is the filepath correct? Have you included the slash on the end of the directory name?

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Renaming file names in Excel with macros and then applying the renamed file name to fo

    i would suggest taking a look on the net for a file re-namer...there are plenty of free 1's out there. the better 1's will let you specify how you want to change the file name, and what you want to add and where etc

    that will be done without any input/interaction from excel
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  14. #14
    Registered User
    Join Date
    07-31-2012
    Location
    Somewhere, Indiana
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Renaming file names in Excel with macros and then applying the renamed file name to fo

    Hey brascoeuw,
    I was searching for a macro that would import file names into Excel. It seems like you have one. Would you mind giving it to me? Thanks!

  15. #15
    Registered User
    Join Date
    08-02-2012
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Renaming file names in Excel with macros and then applying the renamed file name to fo

    Please Login or Register  to view this content.
    Last edited by Cutter; 08-27-2012 at 11:48 AM. Reason: Added code tags

  16. #16
    Registered User
    Join Date
    07-31-2012
    Location
    Somewhere, Indiana
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Renaming file names in Excel with macros and then applying the renamed file name to fo

    Thanks so much!! Saved me from a life with Carpel Tunnel Syndrome !!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1