Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Read number of lines in file

 


Syntax

File_GetLinesInFile(sFile) As Boolean 


Parameters

sFile (String)

Filename

...

Number of lines will be stored in giValue and each line will be stored in gaValue 


Example

Code Block
languagevb
themeEclipselanguagevb
titleVBScript
If bStatus Then bStatus = File_GetLinesInFile("C:\CapaInstaller.txt")
If bStatus Then
  bStatus = Job_WriteLog("Custom", "giValue: " & giValue, bStatus, True)
  For index = 0 To UBound(gaValue)
    If bStatus Then bStatus = Job_WriteLog("Custom","Line #" & index + 1 & " contains: '" & gaValue(index) & "'", bStatus, True)
  Next
End If

Scripting Guidelines 


Related functions

File_AppendToFile File_FindInFile File_InsertInFile