D-

Try this....

 <!--- READ FILE FROM FILE SYSTEM --->
 <CFFILE ACTION="Read" FILE="Drive:\testfiles\020300.txt" VARIABLE="text">
 <!--- BEGIN LOOPING THROUGH LIST PROCESS --->
 <CFLOOP INDEX="fred" LIST="#text#" DELIMITERS="#Chr(13)#">
 <!--- Fred is a list delimited by spaces --->
 <!--- Check the first list item to see what kind of record it is --->
     <CFIF ListFirst(Fred," ") IS "E-mail:">
        <!--- If its email just get the last list item --->
        <CFSET emailaddress = Trim(ListLast(Fred," "))>
          <cfoutput>#emailaddress#</cfoutput> -
     <cfelseif ListFirst(Fred," ") IS "Name:">
        <!--- If its a name, get the second list item as first name and the last
list item as last name --->
          <CFSET firstname = ListGetAt(Fred,"2"," ")>
          <cfset lastname = ListLast(Fred," ")>
          <cfoutput>#firstname# #lastname#</cfoutput><br>
     </cfif>
 </CFLOOP>

HTH

Regards

Stephen

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
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