APPEND Append one local file to another |
Top Previous Next |
Use this script command to append the source file to the destination file.
For example, the following appends a file to an existing file named file2 in a different folder.
APPEND "c:\test\file" "c:\test2\file2"
If test2 is an existing folder, the following appends a file to a file of the same name in a different folder.
APPEND "c:\test\file" "c:\test2"
Otherwise, file is appended to a file named test2 in the root folder of drive C:.
If appending multiple files to one output file wild cards may be used in the source. Wildcards are not permitted in the destination. The files are ordered by name when appended this way.
APPEND "c:\test\*" "c:\test2\file2"
In any case where the destination file does not previously exist, the APPEND command performs a COPY function.
After any source files have been appended to a destination file, the %copyfiles internal script variable is automatically populated with the source path of all such files.
Related command(s): COPY, RENAME, MOVE, DELETE, DOSCMD, WRITEFILE, WORKINGDIR, Using the %copyfiles Variable |