Yeah, CFEXECUTE is a much better option.

I built a recursive directory parser that takes function arguments for the
actual processing to do at each level.  I use it for a myriad of things, not
just deleting stuff, so it's the solution at the front of my mind.  Deleting
a directory happens rarely enough that performance isn't much of a concern
to me.  I can also get a list of what would be deleted first, filter by
extension, or whatever else very easily.  CFEXECUTE is all or nothing.

I also built a custom profiling framework and use the directory parser to
convert comments of the form
<!---PROFILE:custom profiling message--->
into the appropriate code and then back to comments.  Very nice since I can
change the code required by the framework and easily update my entire source
tree (70,000 lines in several thousand files) in one fell swoop.  Guess what
how I got those counts?  ;)

It's really handy, although I use it much more for administrative tasks,
rather than actual application functionality.

cheers,
barneyb

---
Barney Boisvert, Senior Development Engineer
AudienceCentral
[EMAIL PROTECTED]
voice : 360.756.8080 x12
fax   : 360.647.5351

www.audiencecentral.com


> -----Original Message-----
> From: Dave Watts [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 22, 2003 12:59 PM
> To: CF-Talk
> Subject: RE: Deleting an entire folder
>
>
> > You have to manually go through and delete all the files
> > and directories within it first.  big pain, especially if
> > you have nested directories. However, recursive CFFUNCTION
> > calls makes it much easier.
>
> Yikes! I'd recommend using CFEXECUTE to do this through your shell with a
> single command instead.
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> voice: (202) 797-5496
> fax: (202) 797-5444
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to