Read all of the existing collections from the registry and loop over them
<CFSET
Branch="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Collec
tions">
<CFREGISTRY ACTION=GETALL Branch="#Branch#"
Type="KEY"
Name="All_Collections">
<!--- Loop over collections. --->
<CFIF Collections.RecordCount GT 0>
<CFLOOP Query="All_Collections">
<CFSET Root = #Branch# & "\" & #Collections.Entry#>
<CFREGISTRY ACTION=GET Branch="#Root#" Entry="TopLevelDirectory"
Type="STRING" VARIABLE="TopLevelDirectory">
<!--- Delete Collections which are meant for SP.CH Search --->
<cfif ListFirst(TopLevelDirectory , "\") eq 'N:'>
<CFCOLLECTION Action="DELETE" Collection="#Collections.Entry#">
</cfif>
</CFLOOP>
</CFIF>
----- Original Message -----
From: "Nate Smith" <[EMAIL PROTECTED]>
To: "Spectra-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, May 08, 2001 13:43
Subject: Determining If a Collection Exists?
> Hello all,
>
> I ran into an annoying little bug. I have to provide full text searching
of
> pdf documents for my client. These pdf's are associated with a specific
> content object type and are all stored in the same directory. So the way
> I've decided to deal with this is to create a new collection called
'mypdfs'
> and point it at the directory housing all the pdfs. I can return the
> filename and then return the corresponding objects based on a filename
> property search.
>
> I created a little utility for the client to manage the collection and I
> don't want the user to get errors if they accidentally try to create the
> collection after the initial creation. Can anyone describe how you
determine
> if a collections exists? I know I could do a CFDIRECTORY, but is there a
> more direct way?
>
> Also, if it seems that my method of indexing these pdfs is not the best
way,
> could you suggest a better method?
>
> Thanks in advance,
> Nate
>
>
> -
> Nate Smith,
> Lead Developer
> [EMAIL PROTECTED]
> www.doceus.com
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.