ConcatenateFiles()

Summary

Writes a group of files one after another into a new file.

Syntax

ConcatenateFiles(array orig_files, string dest_file)

Argument Contents
orig_files Array of full path and file names of files to read
dest_file Full path and file name of files to write

Notes

  • ConcatenateFiles() is similar to the Copy command at the Command Prompt; it can copy one or more text or binary files into a new file.

  • ConcatenateFiles() does not support wildcards; use GetDirectoryInfo() to get a list of files using wildcards.

  • When concatenating records in fixed-format ASCII files, make sure that the records are the same length in all files.

Error Codes

Error Type Meaning
Error The files could not be concatenated (e.g., out of disk space)
NotFound The original files do not exist

See Also

Function Summary
CopyFile() Copies a file