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>&gt; Is there a=20
way to get CFFILE ACTION=3D"Read" to<BR>&gt; recognize tabs and carraige =
returns=20
within a file as a<BR>&gt; delimiters?&nbsp; I haven't had any luck =
trying to=20
parse<BR>&gt; out a tab delimited file because all the tabs and<BR>&gt; =
carraige=20
returns collapse into white spaces.&nbsp; Please<BR>&gt; 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.&nbsp; 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.&nbsp; I would guess lists<BR>would work =
best:<BR><BR>&lt;!---=20
read file ---&gt;<BR>&lt;cffile action=3D"read" file=3D"my_file.txt"=20
variable=3D"big_file"&gt;<BR><BR>&lt;cfoutput&gt;<BR>&lt;!--- parse file =
and print=20
in a table ---&gt;<BR>&lt;table border=3D"1" align=3D"center" =
cellpadding=3D"3"=20
cellspacing=3D"1"<BR>width=3D"100%"&gt;<BR>&lt;cfloop =
list=3D"#big_file#"=20
index=3D"sub_list"=20
delimiters=3D"#chr(13)##chr(10)#"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;tr&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;=20
&lt;cfloop list=3D"#sub_list#" index=3D"item"=20
delimiters=3D"#chr(9)#"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;td&gt;#item#&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/cfloop&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;=20
&lt;/tr&gt;<BR>&lt;/cfloop&gt;<BR>&lt;/table&gt;<BR>&lt;/cfoutput&gt;<BR>=
<FONT=20
face=3DArial size=3D2>&lt;!--- EOF ---&gt;</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.

Reply via email to