Use the <cfdirectory to get a list of the files, then loop through to find
the greatest.  Of course, since backup100.log is less than backup99.log in a
dictionary sort you will have to come up with a substring extraction to get
the actual number out of the file name and compare those and then to fetch
the file you could just retrieve backup#number#.log once you know what the
biggest number is.  (Of course, I would probably start by changing my log
file names to be logMMDDYYYY.log so that successive dates always show with
the most recent passing the string comparison.

-----Original Message-----
From: Jim Watkins [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 06, 2001 9:07 AM
To: CF-Community
Subject: Retreiving latest file


I need to modify CFMAILPARAM below to send me the latest log file. The
current
backup log is backup09.log and tomorrow it will be backup10.log and so on.
What do I need to do?

<CFMAIL FROM="Eagle"
To=jwatkins
Subject="Backup Report">
Greetings from Eagle!
Backup Report attached to this message
<CFMAILPARAM FILE="C:\NTBackup\data\backup09.log">
</CFMAIL>

Jim Watkins
http://www.ngtcollege.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to