I have pdf files in a directory that CF reads using cfdirectory. It finds the 
filename under the user's name such as "jsmith.pdf", but at times a user may 
have two pdf files in the directory such as "jsmith.pdf" and "jsmith2.pdf".

How can I have it find both instances?  Can I use a wildcard character such as 
"*"? 

For example: 
<cfloop query="dirlist"> <!--- loop outputs the file names and sizes of each 
file --->
#name*# 
</cfloop>

I tried this and got an error. See my code below.

Thanks for any help.

Robert O.
HWW

<cfloop list="#form.thelist#" index="i"> <!--- loop through the list of names 
w/ i holding the individual names ---->
<cfoutput>name: #i#<br>

<cfdirectory directory="e:/pdfs" action="list" name="dirlist" filter="#i#*"> 
<!--- check the directory for the no. of files w/ a name like the user name 
exist --->
no. of files: #dirlist.recordcount#<br> <!--- shows how many of each file 
exists --->

<cfloop query="dirlist"> <!--- loop outputs the file names and sizes of each 
file --->
#name# <br>
</cfloop><br>

</cfoutput>
</cfloop>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253120
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to