ReNamer:Pascal Script:Read file content

From den4b Wiki
Revision as of 20:43, 2 August 2009 by Den4b (talk | contribs) (Created page with '== Read lines from file == There are couple of functions available which make this task simple: '''FileReadLine''' and '''FileCountLines'''. ...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Read lines from file

There are couple of functions available which make this task simple: FileReadLine and FileCountLines.

For example, if you have a text file containing names (one name per line) which you would like to assign to a list of files, you can use the script below:

var
  I: Integer;
begin
  I := I + 1;
  FileName := FileReadLine('C:\Names.txt', I);
end.