This is a multi-part message in MIME format.
------=_NextPart_000_0042_01BFF252.AC6EB600
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
> Is there a way to get CFFILE ACTION=3D"Read" to
> recognize tabs and carraige returns within a file as a
> delimiters? I haven't had any luck trying to parse
> out a tab delimited file because all the tabs and
> carraige returns collapse into white spaces. Please
> help someone.
I think I've heard other people say this before, too, but CF isn't
necessarily for every task. If this is a one-time script, it might be =
okay,
but if this is something to be used in a production environment, perhaps
something like Perl would be a faster solution...
If you are committed to doing this in CF, you can do stuff with Regular
Expressions (my favorite!) or with list functions. I would guess lists
would work best:
<!--- read file --->
<cffile action=3D"read" file=3D"my_file.txt" variable=3D"big_file">
<cfoutput>
<!--- parse file and print in a table --->
<table border=3D"1" align=3D"center" cellpadding=3D"3" cellspacing=3D"1"
width=3D"100%">
<cfloop list=3D"#big_file#" index=3D"sub_list" =
delimiters=3D"#chr(13)##chr(10)#">
<tr>
<cfloop list=3D"#sub_list#" index=3D"item" =
delimiters=3D"#chr(9)#">
<td>#item#</td>
</cfloop>
</tr>
</cfloop>
</table>
</cfoutput>
<!--- EOF --->
HTH-- Danny Boy
------=_NextPart_000_0042_01BFF252.AC6EB600
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3>> Is there a=20
way to get CFFILE ACTION=3D"Read" to<BR>> recognize tabs and carraige =
returns=20
within a file as a<BR>> delimiters? I haven't had any luck =
trying to=20
parse<BR>> out a tab delimited file because all the tabs and<BR>> =
carraige=20
returns collapse into white spaces. Please<BR>> help =
someone.<BR><BR>I=20
think I've heard other people say this before, too, but CF =
isn't<BR>necessarily=20
for every task. If this is a one-time script, it might be =
okay,<BR>but if=20
this is something to be used in a production environment, =
perhaps<BR>something=20
like Perl would be a faster solution...<BR><BR>If you are committed to =
doing=20
this in CF, you can do stuff with Regular<BR>Expressions (my favorite!) =
or with=20
list functions. I would guess lists<BR>would work =
best:<BR><BR><!---=20
read file ---><BR><cffile action=3D"read" file=3D"my_file.txt"=20
variable=3D"big_file"><BR><BR><cfoutput><BR><!--- parse file =
and print=20
in a table ---><BR><table border=3D"1" align=3D"center" =
cellpadding=3D"3"=20
cellspacing=3D"1"<BR>width=3D"100%"><BR><cfloop =
list=3D"#big_file#"=20
index=3D"sub_list"=20
delimiters=3D"#chr(13)##chr(10)#"><BR> &n=
bsp; =20
<tr><BR>  =
; =20
<cfloop list=3D"#sub_list#" index=3D"item"=20
delimiters=3D"#chr(9)#"><BR> =
&=
nbsp; =20
<td>#item#</td><BR> =
=20
</cfloop><BR> =
=20
</tr><BR></cfloop><BR></table><BR></cfoutput><BR>=
<FONT=20
face=3DArial size=3D2><!--- EOF ---></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3><FONT=20
face=3DArial size=3D2></FONT><BR>HTH-- Danny=20
Boy</FONT><BR><BR></DIV></FONT></BODY></HTML>
------=_NextPart_000_0042_01BFF252.AC6EB600--
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.