This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

OpenAppend

OpenAppend["file"]
opens a file to append output to it, and returns an OutputStream object.
  • The following options can be given:
BinaryFormatFalsewhether to use binary format for the file
CharacterEncodingAutomaticwhat raw character encoding to use
FormatTypeInputFormdefault format for printing expressions
NumberMarks$NumberMarkswhen to use ` marks in approximate numbers
PageWidth78number of character widths per line
TotalWidthInfinitymaximum number of character widths for a single expression
  • On computer systems that support pipes, OpenAppend["!command"] runs the external program specified by command, and opens a pipe to send input to it.
  • If OpenAppend does not succeed in opening a particular file or pipe, it generates a message, and returns $Failed.
  • OpenAppend returns OutputStream["name", n], where name is the full name of a file or command, and n is a serial number that is unique across all streams opened in the current Mathematica session.
  • SetOptions can be used to change the properties of an output stream, after it is already open.
  • Functions like Put and Write automatically open the files or pipes they need, if they are not already open.
Create a file and write an expression to it:
Read the file:
Open the file using OpenAppend:
Write an expression and close the stream:
Read the file:
Create a file and write an expression to it:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
Read the file:
Open the file using OpenAppend:
In[6]:=
Click for copyable input
Out[6]=
Write an expression and close the stream:
In[7]:=
Click for copyable input
In[8]:=
Click for copyable input
Read the file:
New in 1 | Last modified in 5.1