appends expr to a file.
appends a sequence of expressions expri to a file.
Details and Options
- PutAppend works the same as Put, except that it adds output to the end of the file, rather than replacing the complete contents of the file.
- PutAppend works with cloud objects.
- PutAppend[…,File["file"]] is also supported.
Basic Examples (1)
Append expression values at the end of a temporary file:
Create a directory for temporary files and change to that directory:
Put the value of x in a file:
Update x and append the new value to the file:
The file now contains the two values:
Append successive iterates to the file in a loop:
Reset to the original directory:
Introduced in 1988
Updated in 2016