I'd do something like this:
<!--- set a variable with the allowed extensions --->
<cfset allowedExtensions = "txt,jpg,gif">
<!--- copy the "show all" flag from session scope --->
<cflock scope="SESSION" type="readonly" timeout="10">
<cfif isDefined("SESSION.showAll")>
<cfset REQUEST.showAll = SESSION.showAll>
</cfif>
</cflock>
<!--- get directory contents --->
<cfdirectory name="dir" path="/path/">
<cfloop query="dir">
<cfif ListFindNoCase(allowedExtensions, listLast(name, ".")) OR
isDefined("REQUEST.showAll")>
#name#<br>
</cfif>
</cfloop>
HTH,.
Sharon
----- Original Message -----
From: "phumes1" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, March 18, 2002 1:16 PM
Subject: Re: User Preferences
> Hi,
>
> I have a web interface that lists files on the server. These files have
> different file extensions. What I would like to do is omit certain files in
> the listing based on the extension for different users. I'm not sure how to
> go about it.
>
> By default certain exntensions will be omitted unless the user goes into
> his/her "preferences" and "checks" on the input boxes to "enable" that
> extension to be listed.
>
> Would I use a Access database for this?
>
> Any help would be greatly appreciated.
>
>
>
>
>
> +-----------------------------------------------------------------------------------+
>
> Philip Humeniuk
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
>
>+------------------------------------------------------------------------------------+
>
>
>
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists