Thanks for the prompt reply.

>I assume you don't want to skip empty lines in the file...
>

That's correct.
>At this point you've made at least one mistake that will prevent you
>from getting the result you want... which is, you're looping from 1 to
>the number of files in the directory -- which should (hopefully) have
>nothing to do with the length of the file...

No.  I should have explained myself more.  I need to read every scan every file 
in the directory. (~100)  And then read that file's content to stuff into an 
array.


>
>>              <cfset grab =
>>              refindnocase(".*\r\n",filetemp,start,"true")>
>
>You don't need quotes around "true" -- it's a literal value by
>itself...

:)  Thanks, didn't know that.  


>You may have better luck with using #chr(13)##chr(10)# in your regular 
>expression >instead of \r\n. Plus, if you want to make sure it's 
>cross-platform, you need
>to make it a class or subexpression and count the number of them... I
>believe only windows uses both, max, linux/*nix use a single
>character, but mac doesn't use the same one the *nix systems use...

Cool.  I don't code x-platform, but this info will be useful if I ever have to.

>It might be more efficient to replace any empty lines with a single
>space and then use listToArray() to convert the file into an array...
>this should work:

Thanks for reminding me about the list functions.  I drew a complete blank.  I 
rewrote the code:

 <cfloop from="1" to="#dirs.recordcount#" index="go">
                <cfset numb[go] = listgetat(filetemp,go,chr(13)&chr(10))>
 </cfloop> 

Works like a charm. I have other uses for the numb array, hidden code, so don't 
fret, as I know it will be re-written with every iteration.

--j

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212273
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to