+ Reply to Thread
Results 1 to 6 of 6

Find newest file in a folder

  1. #1
    Forum Contributor
    Join Date
    09-03-2008
    Location
    Somerset, England
    MS-Off Ver
    XP, 2003, 2007 - depends on location
    Posts
    185

    Find newest file in a folder

    Hi all,

    I am doing a project for work at the moment where by I have to manipulate a report compiled by an external program and do various bits and bobs to it. Trouble is, the other program creates a new version every time it runs the report (i.e filename.1.xls, and the next day filename.2.xls, and so on). Is there any way of searching the folder these files are in to find the newest file and select that one as the one to open and manipulate? There will be no files other than these in the folder.

    Thanks,
    David
    Last edited by duckboy1981; 10-30-2008 at 07:33 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Does this help

    http://j-walk.com/SS/excel/tips/tip97.htm
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    09-03-2008
    Location
    Somerset, England
    MS-Off Ver
    XP, 2003, 2007 - depends on location
    Posts
    185
    Looks to be just what I am after. I will have a play when I get chance and let you know.

    Thanks

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Thanks, let us know & mark the Thread solved when you have checked.

  5. #5
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650
    Hi, This is more or less what you've already got from "RoyUk"
    NB:- Change File Path to suit.
    Please Login or Register  to view this content.
    Regards Mick

  6. #6
    Forum Contributor
    Join Date
    09-03-2008
    Location
    Somerset, England
    MS-Off Ver
    XP, 2003, 2007 - depends on location
    Posts
    185

    Sorted!

    Thanks very much, works a treat!

+ 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