Your problem is that you are calling readln once before the while loop, without passing the data to lbuff.. this is reading the first line..<br><br>I suggest.. scrapping the assign readln method for..<br><br><br>s := TStringList.Create
;<br>s.loadfromfile(AFilename)<br>for i := 0 to s.count -1 do<br>begin<br> lbuff := s[i];<br> dosomething....<br>end;<br><br><div class="gmail_quote">On Dec 5, 2007 6:34 PM, Vikas... <<a href="mailto:vikas.image@gmail.com">
vikas.image@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><br clear="all">Hi</div>
<div> </div>
<div>I am back again. Well i need one help in file handling. May be i sound dump here but i struck up badly at one point here. Ok let me first explain my first situation.</div>
<div> </div>
<div>I have say 10 files and path is say c:\vikas\file1text upto c:\vikas\file10.text. I am storyng all this in string list </div>
<div> </div>
<div>ok Here is my sample code</div>
<div>/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</div>
<div>setlength(Ltextfile, (Ftextfilelists.Count));</div>
<div>for L1 := 0 to Ftextfilelists.Count-1 do<br> begin<br> AssignFile(Ltextfile[l1],Ftextfilelists[l1]);<br> reset(Ltextfile[l1]);</div>
<div>
<p> while not Eof(Ltextfile[l1]) do<br> begin<br> Readln(Ltextfile[l1]);<br> while not Eof(Ltextfile[l1]) do<br> begin<br> Readln(Ltextfile[l1],Lbuff);</p>
<p> Do something</p>
<p> end;-</p>
<p>//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</p>
<p>heere ftextfilelists is a string list , ltextfile is an dynamic array of textfile </p>
<p>Ok my problem here is in Lbuff as u can see i am storing the file information say file1.txt content and inside this file i have say 20 rows of information</p>
<p>like this</p>
<p>(***********************************************************************************</p>
<p>1 a vb ssss sdsdadadasdas asdadadasdasd asdadasdasdasdasd</p>
<p>2 aldkasdk;asdk;alskd;aslkd;alkd;alkd;aslkd;askd;askd;alkd;askd</p>
<p>3 asldkas;dk;asdka;sdk;alsdk;alsdk;aslkd;alskd;alskd;alskd;laskd</p>
<p> </p>
<p>***********************************************************************************}</p>
<p>Now the problem is the above code takes the value from 2 instead of 1 it ignores the first row of information and this si what confusing me</p>
<p>I may be sound stupid here but i will apreciate if anyone suggest me something wrong in my above code logic</p>
<p>Thanks</p>
<p>Vikas</p>
<p> </p>
<p> </p>
<p> </p><br>-- <br> vikas </div>
<br>_______________________________________________<br>NZ Borland Developers Group - Delphi mailing list<br>Post: <a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a><br>Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">
http://delphi.org.nz/mailman/listinfo/delphi</a><br>Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br></blockquote></div><br><br clear="all">
<br>-- <br>Kyley Harris<br>Harris Software<br>+64-21-671-821