Try this function on cflib: FileDateLastModified: http://www.cflib.org/udf.cfm?ID=126
windows only On 10/19/06, Ben Koshy <[EMAIL PROTECTED]> wrote: > > Problem with that method is that it'll do a String Sort... and unless he's > diligent about padding with enough zeroes... it could sort things oddly > such > as > > file01 > .. > .. > .. > file10 > file100 > file101 > file11 > file12 > > A date sort might work but if he modifies the file ...the dates will be > changed as it goes by the modify date and not the creation date. If the > app > doesn't touch them after creation he'll be ok. > > ----- Original Message ----- > From: "Teddy Payne" <[EMAIL PROTECTED]> > To: "CF-Talk" <[email protected]> > Sent: Thursday, October 19, 2006 9:57 PM > Subject: Re: Find last file. > > > > Ian, > > You can use cfdirectory to query a folder. Then use cfquery to perform > a > > query of a query of the cfdirectory name and then sort based upon the > file > > name in desc order. > > > > Teddy > > > > On 10/19/06, Ian Skinner <[EMAIL PROTECTED]> wrote: > >> > >> I have an app that writes out a file that is named with consecutive > >> numbers, i.e. file01, file02, file04. The numbers are actually based > on > >> the date the file is written. What I'm looking for is an easy way to > >> find > >> the last file written, the one with the highest integer appended to the > >> file > >> name. > >> > >> Can anybody help my muddled mind? > >> > >> TIA > >> > >> > >> -------------- > >> Ian Skinner > >> Web Programmer > >> BloodSource > >> www.BloodSource.org > >> Sacramento, CA > >> > >> --------- > >> | 1 | | > >> --------- Binary Soduko > >> | | | > >> --------- > >> > >> "C code. C code run. Run code run. Please!" > >> - Cynthia Dunning > >> > >> Confidentiality Notice: This message including any > >> attachments is for the sole use of the intended > >> recipient(s) and may contain confidential and privileged > >> information. Any unauthorized review, use, disclosure or > >> distribution is prohibited. If you are not the > >> intended recipient, please contact the sender and > >> delete any copies of this message. > >> > >> > >> > >> > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257401 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

