I would do something more like:

 <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 datediff("d",datelastmodified,now()) GTE 60>
                         <CFFILE ACTION="Delete"
                         FILE="#cleanup_path##Name#">
                 </CFIF>
         </CFIF>
  </CFLOOP>

HTH,

-- 
Howie Hamlin - inFusion Project Manager
On-Line Data Solutions, Inc. - www.CoolFusion.com
inFusion Mail Server (iMS) - The Award-winning, Intelligent Mail Server
PrismAV - Virus scanning for ColdFusion and BlueDragon applications
Find out how iMS Stacks up to the competition: 
http://www.coolfusion.com/imssecomparison.cfm
------------------------------------------------------------------------------------------------
iMS-Lite - the completely free mail server solution for applications and 
application servers
http://www.coolfusion.com/iMSLite
------------------------------------------------------------------------------------------------
Interested in running your own email campaign or having a campaign completely 
set up?  
Try www.campaignsmarts.com.  Affilate program also available
------------------------------------------------------------------------------------------------

--- On Tuesday, March 29, 2005 2:54 PM, Scot VanAlstine scribed: ---
>
> 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! 
> 
> 

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