> The point is moot now that I understand the need to match the lock names in
> the optimize and search steps. I was originally made curious when I looked
> at the CF Admin tool that listed the collections - I thought maybe there
> was an easy way to loop over them like I assume CF Admin does, but those
> files are encrypted.
To get a list of all collections on the system and then optimize them you
can do something like this.
<cfregistry
action="GETALL"
branch="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Collectio
ns"
name="q"
type="Key"
>
<cfloop query="q">
<cflock name="cfindex_collection_#entry#" timeout="30">
<cfcollection action="OPTIMIZE" collection="#entry#">
</cflock>
</cfloop>
(You may want to put a cftry block around the cfcollection to avoid
situations with damaged collections.)
--
Michiel Boland <[EMAIL PROTECTED]>
Digital Valley Internet Professionals
Plantsoen 17, Wageningen, The Netherlands
Phone: +31 317 465555, Fax: +31 317 460276
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.