I tried the MICHELE HENDERSHOT's script. I kinda worked.When I substituted 60 for the 5, it deleted files but I could see no rhyme or reason to what it deleted.
I backtracked and followed Adrian Lynch's advice and added the following lines to my code. <cfset dateString = "dateLastModified"> <cfset dateObj = ParseDateTime(dateString)> <cfdump var="#DateCompare(dateObj, Now())#"> I recieved an error saying: "dateLastModified" is an invalid date format." on the line containing : <cfset dateObj = ParseDateTime(dateString)> (I am truly not dense. I just have not found the answer that works) Here is all my code as it stands now. <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> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:15:793 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
