Re: Lines in a text file
- From: "Les" <vb4@xxxxxxxxxxx>
- Date: Sun, 8 May 2005 11:22:01 -0400
Hi Larry,
Ok Initially what I did was the following since I already knew that all
lines within the text file were of the same size.
Say for example I knew my lines of text within the file were all 410
characters in length.
I used the following:
numOf Lines = FILELEN("e:\chess\file") / 410
This was the code I had tried that didnt produce the exact number. Your
thought of taking into consideration the cr/lf could be the problem since I
did not take them into account. I will have to play with it a bit. I do
remeber a long time ago when I crossed this bridge isnt the filename itself
have something to do with the size??? Perhaps I could be mistaken but just
throwing it out.
Thanks Larry for your suggestions,
Les
"Larry Serflaten" <serflaten@xxxxxxxxxxxxxx> wrote in message
news:OAekcM5UFHA.2172@xxxxxxxxxxxxxxxxxxxxxxx
>
> "Les" <vb4@xxxxxxxxxxx> wrote
> > Note that each
> > line in the text file will be of the same length which I forgot to
mention
> > to you initially, sorry for that. I was thinking if I knew the length
of
> > the first line and was able to get the total size in bytes of the file
that
> > a simple division would get the right answer but it appears that I am
always
> > slightly off.
>
> Post your exact code. Perhaps someone will see why you are slightly
off....
>
> How far are you off?
> (Did you account for the CrLf characters? Is there an extra line at the
end?)
>
>
> LFS
>
>
.
- Follow-Ups:
- Re: Lines in a text file
- From: Randy Birch
- Re: Lines in a text file
- References:
- Lines in a text file
- From: Les
- Re: Lines in a text file
- From: J French
- Re: Lines in a text file
- From: Les
- Re: Lines in a text file
- From: Larry Serflaten
- Lines in a text file
- Prev by Date: Re: Fuzzy Logic
- Next by Date: Re: Lines in a text file
- Previous by thread: Re: Lines in a text file
- Next by thread: Re: Lines in a text file
- Index(es):
Relevant Pages
|