Procedure FileAppend(filename, appendname)

FileAppend

The procedure FileAppend appends the contents of one file to the end of another file. Both files must be text files.

FileAppend(
        filename,       ! (input) scalar string expression
        appendname      ! (input) scalar string expression
        )

Arguments

filename

A scalar string expression representing the file name to which you want to append the contents of the second file.

appendname

A scalar string expression representing the file name that you want to append.

Return Value

The procedure returns 1 on success. If it fails, then it returns 0, and the pre-defined identifier CurrentErrorMessage will contain a proper error message.

Note

  • If the first file (the file to which you append) does not exist, then this file will be created. The contents of the appended file will always start on a new line in the resulting file.

  • When appending files with different character encodings, the result is unpredictable.

See also

The procedures FileCopy, FileExists.