This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Input and Output / File Output  /
OpenWrite

  • OpenWrite[" file "] opens a file to write output to it, and returns an OutputStream object.
  • OpenWrite deletes any existing contents in a file, and prepares to write output starting at the beginning of the file.
  • For output to pipes, OpenWrite and OpenAppend are equivalent.
  • See notes for OpenAppend.
  • See the Mathematica book: Section 2.11.3.