f$FileOpen (f$DateiÖffnen)
f$FileOpen (f$DateiÖffnen)
Open a file for reading or writing. A file number is returned which identifies the opened file for further read/write operations. To ensure that an input file also exists or that an already existing file is not overwritten with an output file, you can check the existence of a file beforehand with the f$FileExists function.
Please note that, when entering a path in the file name, the character "\" must be entered twice ("\\").
Syntax: | FileNo = f$FileOpen( Filename, Mode ) | ||
| Argument | Type | Meaning |
| Filename | String | File name including path |
| Mode | String | Mode of access to the file: 'b' : open as binary file. This option can be combined with other options, e.g. 'wb' write binary to a new file. |
Result: | Integer | File number or 0 if the file cannot be opened. | |
Example: | No = f$FileOpen( 'c:\\customers\\customer.txt', 'r' ) | ||