> Thanks for the prompt reply.
welcome
>>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.
Except that iirc this comment was below the opening of the inner loop
which was where you were adding individual lines in the file to the
line-array... You'd already passed the directory-loop in which the
number of files was relevant.
<cfloop query="directory">
<!--- loop over lines in the file --->
<cfloop index="x" from="1" to="#directory.recordcount#">
... stuff the next line into the file line-array...
</cfloop>
</cfloop>
That's what I remember seeing... which won't work... not correctly
anyway -- it may never throw an error if the number of lines in the
file is always greater than the number of files in the directory, but
it'll drop any lines in the file in excess of the number of files in
the directory, so if you have 100 files each of 150 lines, each file
line-array will be 50 lines short of the number of lines in the file.
Granted the issue is moot if you've replaced the inner loop with
listToArray().
s. isaac dealey 954.522.6080
new epoch : isn't it time for a change?
add features without fixtures with
the onTap open source framework
http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:212277
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54