$bool = LoadFile (
<file name>, <$variable>, [nooflines] )
Loads the specified
number of lines of text from the file to a group variable.
Parameters
< file name
> File from which the number of lines of text is loaded.
< $variable
> Variable to load the text into.
[ nooflines ]
Number of lines of text to be loaded.
Return Value
LoadFile function
returns a boolean value indicating success or failure; 1 for success
or 0 for failure.
Remarks
- If the optional
parameter [ nooflines ] is not specified, then the entire content of
the file is assumed and is loaded to the variable.
- This is applicable only for text files. In addition to the specified number of lines, the following details are also populated.
- $variable.FileDate
- $variable.FileLines
- $variable.FileName
- $variable.FileSize
Example
$Status = LoadFile("abc.txt", "$Variable", 10)
- Loads first
10 lines of text from the file "abc.txt" to the variable "$Variable.Line1",
"$Variable.Line2", ....... "$Variable.Line10".