This should work for you...



<cfdirectory action="LIST" directory="c:\mydocs\xls_files" name="files"
filter="*.xls" sort="name">

<!--- stash the file names in a list --->
<cfset file_list = valuelist(files.name)>

<!--- generate the select --->
<select name="xls_file">

        <!--- loop through the list --->
        <cfloop index="file_name" list="#file_list#">

                <option value="#file_name#">#file_name#</option>

        </cfloop>

</select>



-----Original Message-----
From: Claremont, Timothy S [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 07, 2000 10:02 AM
To: '[EMAIL PROTECTED]'
Subject: Using CFDIRECTORY with CFSELECT


Can I combine CFSELECT and CFDIRECTORY to allow the end user to select a
file that exists in a directory?


The result I am after is a drop down list of all of the .XLS files in a
given directory, so that the end user can choose the file that they want to
update via CFFILE.
--------------------------------------------
Tim Claremont
Xerox Corporation
--------------------------------------------
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to