For the life of me I could not figure out why I was having problems.
MIchelles code works fine when run on a windows box.
When I run it on my UNIX box the dates it deletes are odd.
Here is the code that runs fine on NT

<cfset deletedate = #dateadd("d",-60,now())#>
<cfset newformateddate = #dateformat(createdate(year(deletedate),
month(deletedate), day(deletedate)), "mm/dd/yyyy")#>
<cfset cleanup_path = "/isweb/weblogs/bbpt/">
<CFdirectory directory=#cleanup_path#
    NAME="CleanUpDirectory"
    SORT="name ASC, size DESC">
<CFLOOP Query="CleanUpDirectory">
        <CFIF #type# IS "File">
                <CFIF #datelastmodified# LT #newformateddate# >
                        <CFFILE ACTION="Delete"
                        FILE="#cleanup_path##Name#">
                </CFIF>
        </CFIF>

C'mon ya'll  There is bound to be someone out there who knows the answer!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:797
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

Reply via email to