+ Reply to Thread
Results 1 to 4 of 4

Excel File Directory - List NEW Files only

  1. #1
    Registered User
    Join Date
    02-23-2010
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Excel File Directory - List NEW Files only

    I've found lots of Excel VBA code for creating a file directory in Excel, and they have been absolutely wonderful.

    I've created a file directory using file paths and file names (and have about 20 files in there). However, since it's a shared folder, people will be adding new files to it all the time. If I click the "Grab Files" button again, I end up duplicating the original 20 files, and getting additional (new) files.

    Is there a way to setup this directory to include ONLY the new files by "updating" it? Perhaps it can check which files are already listed in the file directory - and add only the new ones to the list? Is this possible? Any help would be great!! Thank you!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Excel File Directory - List NEW Files only

    Please have a look at a solution I wrote for a similar request today

    http://www.excelforum.com/excel-prog...-in-order.html

    This solution uses a dictionary object to keep track of the file already in the register
    If you like my contribution click the star icon!

  3. #3
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Excel File Directory - List NEW Files only

    Please have a look at a solution I wrote for a similar request today

    http://www.excelforum.com/excel-prog...-in-order.html

    This solution uses a dictionary object to keep track of the file already in the register

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,091

    Re: Excel File Directory - List NEW Files only

    Perhaps a naive question, but why don't you just clear the output sheet at the start of the macro.

    Seems a lot of effort to go to add new files ... which implies checking each file against the existing list and, if it doesn't exist, add it. If it does, ignore it. You still have to loop through the entire folder/sub-folder structure.

    Just a thought.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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