Inno Setup Preprocessor: FileRead

Prototype

str FileRead(int)

Description

The function reads the next line in a text file opened with FileOpen. The only parameter should be the file handle returned by FileOpen.

Example

#define FileHandle
#define FileLine
#sub ProcessFileLine
  #define FileLine = FileRead(FileHandle)
  #pragma message FileLine
#endsub
#for {FileHandle = FileOpen("c:\autoexec.bat"); \
  FileHandle && !FileEof(FileHandle); ""} \
  ProcessFileLine
#if FileHandle
  #expr FileClose(FileHandle)
#endif

See also

define, sub, pragma, for, if.