Object functions and properties allow the importing and exporting of data by way of external files.  Multiple files can be opened at the same time, and there are additional File & Disk Functions functions available that support task associated with working with data on the disk and its various sub-directory folders.  





Closes an open file.


Returns the number of lines in the file. Takes the file number as a parameter


Returns the default folder used by the file manager for locating files. This is also the main Trading Blox folder

EndOfFile() or EOF()

Returns TRUE if the end of the file is reached


The OpenAppend function opens a text file for writing. If the file already exists, the file will be opened for writing at the end of the file and any previous information will not be erased.


Opens a file for reading


Opens a file for writing


Returns TRUE if the entire line was not read fully by ReadLine


Reads a line from a file into a string variable


Writes a string to the file appending a new line character


Writes a string to the file without a new line character



See string functions GetField for use in parsing the input from files.  See GetFieldCount for discovering the number of comma seperated fields in the record.


If you are opening multiple files be sure to save the File Numbers into BPV Integer Variables for use in other areas of the module.

If you save a File-Number in a temp Local variable, then it will be lost once you leave the script section.

Normally one would open the files in the Before Test script and close in the After test script. The BPV Integer File Number variables can then be used to read and write from the various files at the same time. When using the OpenAppend function the file can be closed and opened multiple times during the test, since the writing will always be appended to the end of the file.



File & Disk Functions, GetField, GetFieldCount

See Also:


Edit Time: 2/25/2018 10:59:24 AM

Topic ID#: 107





Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software