Note: This is a work in progress and many formatting issues have been fixed. Read more about the project on the home page.
open file fileName
The open file
command opens the specified file so that you can read data from it and write to it. Usually, the file is an ASCII text file opened to allow importing or exporting text. If the file doesn’t exist, HyperCard creates it.
Use the close file
command to close files after you’ve opened them.
Note: You must provide the full path name of the file if it’s not at the same directory level as HyperCard.
If HyperCard has problems opening the specified file, it sets the result
as follows:
Nonexistent file that can't be created:
Can't create that file.
Existing file already open:
File is already open.
Other error opening file:
Can't open that file.
An expression that evaluates to a text string that is also a valid Macintosh filename.
For example: