Joins together (merges) a file previously split into pieces using the Split File action. This action can merge split files to the original file name or join to a path and file name of your choice. Commonly used to merge large files that were originally split to pieces in order to make the original file easier to distribute or transport, such as via FTP or as e-mail attachments.
Declaration
<AMMERGEFILE FILE="text" DESTINATIONTYPE="text" DESTINATION="text" OVERWRITEFILE="Yes/No" ALLFILEPIECESMUSTEXIST="Yes/No" RECYCLEFILEPIECES="Yes/No" />
Example
Join parts of source file "C:\Temp\splitfile.txt.0" into "Different" file. New filename is "C:\Temp\Temp\mergedfile.txt". Overwrite if file already exists. All file pieces in span must exist. Recycle all file pieces after join is complete.
<AMMERGEFILE FILE="C:\Temp\splitfile.txt.0" DESTINATIONTYPE="Different" DESTINATION="C:\Temp\Temp\mergedfile.txt" OVERWRITEFILE="YES" ALLFILEPIECESMUSTEXIST="YES" RECYCLEFILEPIECES="YES" />
See Also: Split File, Move File, Create Folder, Delete File, Delete Folder, Rename Folder, Remove Folder, Touch File, Set Attributes, Read from File, Write to File, Synchronize Folders, Concatenate Files
Property |
Type |
Required |
Default |
Markup |
Description |
Source File |
Text |
Yes |
(Empty) |
FILE="C:\Temp\filename.txt" |
Indicates the files to join that were originally split using the Split File action. Files created as a result of a split will include a period followed by a number appended to the original file name starting with 0 (i.e. file.txt.0, file.txt.1, file.txt.2, etc.). This parameter requires the path and file name of the first split file with the extension *.0 (i.e. C:\Temp\filename.txt.0). |
Join to original filename |
Text |
No |
Enabled |
DESTINATIONTYPE="Original" |
If enabled, the files that were created as a result of the Split File action will be joined to the original file name. When this option is enabled, the Join to different filename option is ignored. This option is enabled by default. |
Join to different filename |
Text |
No |
Disabled |
DESTINATIONTYPE="Different" |
If enabled, the files that were created as a result of the Split File action will be merged to a specific path and file name. When this option is enabled, the Join to original filename parameter is ignored. |
Destination |
Text |
No |
(Empty) |
DESTINATION="C:\Temp\mergedfile.txt" |
Indicates the path and file name that the originally split files will be merged onto. If the file does not exist, it will automatically be created during runtime. This parameter is available only if the Join to different filename parameter is enabled. |
Overwrite Existing File |
Yes/No |
No |
No |
OVERWRITEFILE="YES" |
If set to YES, matching destination files will be overwritten with the newly merged file. This parameter is set to NO by default. |
All file pieces in span must exist |
Yes/No |
No |
No |
ALLFILEPIECESMUSTEXIST="YES" |
If set to YES, all files that were originally created by the Split File action must exist during the merge, otherwise, an error will occur. If set to NO (default), the merge will proceed despite any missing files. |
Send file pieces to recycle bin after join is complete. |
Yes/No |
No |
No |
RECYCLEFILEPIECES="YES" |
If set to YES, the split files will be sent to the recycle bin when the merge is completed. This parameter is set to NO by default. |