+ Reply to Thread
Results 1 to 2 of 2

BEST code for LISTING and RENAMING files in any folder based on any extension Criteria

  1. #1
    Registered User
    Join Date
    12-03-2012
    Location
    Doha, Qatar
    MS-Off Ver
    Excel 2007
    Posts
    7

    BEST code for LISTING and RENAMING files in any folder based on any extension Criteria

    Hi Guys,
    I worked really hard to get this solution. As I successfully completed it, so just sharing the code for your information and maybe improvement.
    The function of this code is to RENAME the names of files based on their extension i.e. TXT, PDF, DOC etc in ANY folder chosen through a dialog box. You have to first used the routine "GetFileNames" to get all the file names in COLUMN-A of any empty excel sheet. Then do any formatting to the name of file in COLUMN-B (adjacent cells). Then you can rename the file names of COLUMN-A based on new names in COLUMN-B. Please don't change the full path or anything. Just change the ending part of file name (without path).
    Regards and Cheers

    Please Login or Register  to view this content.
    This code gonna make my life lot easier now on
    Last edited by Paul; 01-11-2013 at 03:39 PM.

  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: BEST code for LISTING and RENAMING files in any folder based on any extension Criteria

    Thank you for posting this. It will surely help someone out here.
    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]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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