file.open

Syntax file.open (path)

Params path is a legal path name to the file you wish to open.

Action Opens the file for reading or writing.

Returns True if the file exists and was opened, false otherwise.

Examples file.open ("C:\\Program Files\\Frontier\\sample.txt")

   » true


file.open ("System:System Folder:textfile")

   » true

f = "System:System Folder:textfile"
if file.open(f)
while (!file.endOfFile (f))

file.readLine (f)

Examine this script. It reads all of the text in the file whose path is stored in "f."

Errors If the file at path is already open by another application, an error message will be generated.

Notes Always call file.close when you're done working with an open file.

See Also file.close

file.readLine

file.endOfFile

file.write

file.readWholeFile

Discuss