kdh7807
05-29-2006, 04:47 AM
beginning_line = 4;
end_line = 10;
-- populate a table with the contents of a text file
tabText = TextFile.ReadToTable("c:\\test.txt");
-- Initialize variable strLinesOfText
strLinesOfText = "";
-- Set the current line number
line = beginning_line;
-- Loop through table until end condition is reached
while line < (end_line + 1) do
-- Append data to variable strLengthOfText
strLinesOfText = strLinesOfText .. "\r\n" .. "Line " .. line .. ": " .. tabText[line] .. "\r\n";
line = line + 1;
end
i want set end_line automatically
how do i get last line in txt file?
end_line = 10;
-- populate a table with the contents of a text file
tabText = TextFile.ReadToTable("c:\\test.txt");
-- Initialize variable strLinesOfText
strLinesOfText = "";
-- Set the current line number
line = beginning_line;
-- Loop through table until end condition is reached
while line < (end_line + 1) do
-- Append data to variable strLengthOfText
strLinesOfText = strLinesOfText .. "\r\n" .. "Line " .. line .. ": " .. tabText[line] .. "\r\n";
line = line + 1;
end
i want set end_line automatically
how do i get last line in txt file?