<cfloop from="1" to="#listLen(form.fieldNames)#" index="i">
<cfif len(evaluate("form.file" & #i#))>
<cfoutput>
Received file number #i#
</cfoutput>
<cfelse>
nothing
</cfif>
</cfloop>
Douglas Brown
Email: [EMAIL PROTECTED]
----- Original Message -----
From: "W Luke" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, May 19, 2002 8:39 AM
Subject: Looping through file-fields
> Hi,
>
> I need to loop through 5 form-file-fields. Each one is called
"file" with a
> number from 1-5 appended to it, i.e. "file1".
>
> This seems an easy idea, but I'm having trouble with it. If a
file *has*
> been uploaded, I'd need to do something with it....but do
nothing if no file
> is found. My feeble attempt is below:
>
> <Cfloop from=1 to=5 index="f">
>
> <Cfif ('form.file#f#') NEQ "">
>
> Received file number #f#<br>
> <Cfelse>
> Nothing for #f#<br>
>
> </CFIF>
>
> </CFLOOP>
>
> Any advice appreciated
>
> Will
>
>
>
> -------
>
> Become a Pingographer and share your photos for free:
>
> http://www.localbounty.com/pingo
>
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
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