Well I removed the quotes from around the dateLastModified variable. <CFSET logPath = "#application.logPath#"> <CFDIRECTORY ACTION="List" DIRECTORY="#logPath#" NAME="dir_listing"> <cfloop query="dir_listing"> <cfset dateString = dateLastModified> <cfset dateObj = ParseDateTime(dateString)> <cfdump var="#DateCompare(dateObj, Now())#"> <cfif DateCompare(dateObj, Now()) GTE 0> <cffile action="DELETE" file="#logPath#/#name#"> </cfif> </cfloop>
I run the previous code and get a series of "-1"s on the the screen. -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 I look in the directory and everything is still there. Here are the last modified dates on the files in the directory: 10/30/2001 5/17/2002 5/17/2002 5/24/2002 9/13/2002 9/13/2002 1/9/2003 1/10/2003 6/12/2003 7/30/2003 8/5/2003 8/18/2003 9/3/2003 10/5/2004 3/7/2005 Any ideas anyone? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:15:796 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
