<< Click to Display Table of Contents >>
Manual > Control Reference > Route > Route Methods >
Read from a text file.
syntax
LoadTextFile(
fileName,
&text
[,bArray = FALSE]
)
Parameters
fileName
Type:
character
File name.
&Text
A variable to store the contents of the text file.
bArray
Boolean
If there are multiple lines due to line breaks, they will be obtained as an array.
Return Value
FALSE - Failure. TRUE - Success.
Explanation
Reads from a text file. This function cannot be used unless you log in to the server.
Example
Example 1)
var a; ::LoadTextFile("c:\abc.txt", a); this.Text = a;
Example 2) If there are multiple rows, retrieve them as an array
var a; ::LoadTextFile("c:\abc.txt", a, T); var vLines = ::GetValueTotalElement(a); // Get the number of lines
Supported
○
Script Action
Can be used in server script Ver2 actions
Browser script
Can be used in browser scripts
×
Calculation formula syntax
Can be used in expression syntax (e.g. bind syntax)
reference
LoadTextFile
SaveTextFile
LoadCsvFile
SaveCsvFile
SavePrintText
GetTempFolder
GetTempFile
GetCurrentFolder
GetModuleFolder
GetFileSize
GetFileLastWriteTime
GetLogicalDrives
GetDriveType
EncryptFile
DecryptFile
SetClipboardData
GetClipboardData