File_GetLinesInFile

Description

Read number of lines in file

 

Syntax

File_GetLinesInFile(sFile) As Boolean

 

Parameters

sFile (String)

Filename


Return value

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

 

Example

VBScript
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