I am reading in an external file which is created by another process. I
would like to create a nicer output using a TABLE. I've tried using the
"Replace" fucntion but I'm finding it gets really messy (coding). There has
to be an easier way of doing this? Possibly extracting pieces of each line
and then outputting it. Below is my code:
<cffile action="READ"
file="C:\temp\windows.txt"
nameconflict="OVERWRITE"
variable="logfile">
</cflock>
<cfloop index=list list="#logfile#">
<cfoutput><p
class="dirlinks">#replace(list,chr(10),"<br>","all")#</p></cfoutput>
</cfloop>
Here is a sample of the output from my file. Note that the listing could at
least 10 to 100+ lines but all in the same format and at the same time
remove some text not required in the final output like " : picture", ".nfo"
and the quotes.
C:/mywork/images/gifs/info/info.nfo : picture '000;0-00;00000'
C:/mywork/images/gifs/info/info.nfo : picture '000;0-00;00000'
C:/mywork/images/gifs/info/info.nfo : picture '000;0-00;00000'
I would like to do a search/replace on every line and insert the following
table tags.
<tr><td>C:/mywork/images/gifs/info/info1.nfo</td><td>11</td><td>22</td><td>33</td></tr>
<tr><td>C:/mywork/images/gifs/info/info2.nfo</td><td>11</td><td>22</td><td>33</td></tr>
<tr><td>C:/mywork/images/gifs/info/info3.nfo</td><td>11</td><td>22</td><td>33</td></tr>
Is there a way to shove each TAB entry into a variable for later use too?
var1 = C:/mywork/images/gifs/info/info1.nfo
var2 = 11
var3 = 22
var4 = 33
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:917
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54