Home THE HYPERCARD CENTER

HyperTalk Reference
Home » HyperTalk Reference » Commands

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

open file

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.


Placeholders

fileName
An expression that evaluates to a text string that is also a valid Macintosh filename.

For example:

"my stack"
"HD20:Wally's Stacks:my stack"
"my file alias"


Related Topics

« open | HyperTalk Reference | open printing »


Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Modern View