+ Reply to Thread
Results 1 to 5 of 5

Renaming all FileName in an Folder using Macro at a time with Different Names

  1. #1
    Registered User
    Join Date
    09-13-2010
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    13

    Thumbs up Renaming all FileName in an Folder using Macro at a time with Different Names

    Hi Team,

    Now iam Working in excel 2003, I got a Requirement that, After Downloading datas From SAP, It Directly Stored in Excel Sheet , Using tht Sheet1, I need to rename all the Filenames at a time, Is It possible, Any code is there to rename,

    For Example,

    From SAP to Excel Sheet Datas are Like this in Sheet1,

    DmsNo Filename
    50007685 SDFFG.jpg
    50004678 HGJKID.jpg
    50003421 VGFTHR.jpg



    Then i have rename that filename, rename 'SDFFG.jpg' To '50007685.jpg', and it Should be directly rename to my Source File.

    For Example:
    Source File: C:\test\SDFFG.jpg

    After renaming it Should be,

    Source File: C:\test\50007685.jpg

    Is it Possible?... any code is there to rename,


    Regards
    Karthick
    Last edited by Karthik@1305; 09-24-2010 at 12:45 AM.

  2. #2
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: Renaming all FileName in an Folder using Macro at a time with Different Names

    You can do this in 2 steps. First, list all you directory contents into a sheet, with following codes. Thanks to John Walkenbach for this macro
    Please Login or Register  to view this content.
    Then select all the files and run the below macro
    Please Login or Register  to view this content.
    rgds

    johnjohns

  3. #3
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: Renaming all FileName in an Folder using Macro at a time with Different Names

    Sorry... To run the second macro, select only the first file name. It will stop for the first 10 files (As this cannot be undone, I kept this as a security. You can interrupt and stop the macro here, if needed). Also if you have all the files listed on a sheet, no need for the first macro.

    rgds

    johnjohns

  4. #4
    Registered User
    Join Date
    09-13-2010
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Renaming all FileName in an Folder using Macro at a time with Different Names

    Ok John, thank u so much, Its working Fine, Thanks a lot John,,,,,,,,

    Regards
    Karthick

  5. #5
    Registered User
    Join Date
    12-21-2012
    Location
    delhi
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Renaming all FileName in an Folder using Macro at a time with Different Names

    Hey,

    I'm in an urgent need of an Excel macro that enables me to rename all files in a folder AND put these renamed files in a separate folder.

    Can you please mail me this macro of yours on - [email protected]

    Any help will be much appreciated.

    Cheers

+ 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