File System - Split File

Declaration

<AMFILESYSTEM ACTIVITY="split_file" FILE="text" DEST="text" 
SIZETYPE="text (options)" SIZE="number" BYTETYPE="text (options)" />

Description: Splits the specified file into pieces (or sections) of a fixed size. The pieces can later be re-joined using the Join file activity.

Practical Usage

Commonly used to split a particularly large file into sections in order to make the original file easier to distribute or transport, such as through FTP or as e-mail attachments.

General Parameters

Property

Type

Required

Default

Markup

Description

File to split

Text

Yes

(Empty)

  1. FILE="c:\folder\file.txt"

  2. FILE="file.txt"

Indicates the file to split. The size of the file must be larger than 4 KB in order for it to be split. You can enter a fully qualified path and file name (preferred) or a file name only (requires use of the Change folder activity).

NOTE: If the size selected in the Individual file piece size parameter is greater than the size of the file to split, an error will occur.

Folder for split files

Text

Yes

(Empty)

DESTINATION="C:\FolderName"

The destination folder in which to place the newly split files. Files created as a result of the split will include a period followed by a number added to the original file name  starting with .0 (e.g., file.txt.0, file.txt.1, file.txt.2, etc.)

Individual file piece size

Text (options)

Yes

Floppy

SIZETYPE="FLOPPY"

The size of each individually split file. The number of split file pieces that are created is determined by the individual file piece size specified. The available drop-down list options are:

  • Floppy Disk (1.44 MB) (Default)

  • CD-R 74-min (640 MB)

  • CD-R 80-min (700 MB)

  • DVD single layer (4.7 GB)

  • DVD double layer (8.5 GB)

  • Other

NOTE: The minimum file piece size is 4 KB. If the individual file piece size selected is more than the size of the file specified, an error will occur.

Size

Number

No

(Empty)

SIZE="5""

The size of each individually split file. This parameter is available only if Other is selected from the Individual file piece size parameter. It is used in conjunction with the Byte Type parameter.

Byte type

Text (options)

No

Bytes

BYTETYPE="MB"

The type of byte that should be used to measure the value specified in the Size parameter. This parameter is available only if the option Other is selected from the Individual file piece size parameter. The available options are:

  • Bytes (Default)

  • KB

  • MB

  • GB

Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.

Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)

On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)

Example

The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.

Description: Split file "C:\FolderName\FileName.txt" into parts of "OTHER" and place the parts into directory "C:\Folder2". Each file size is  "20 MB".

<AMSPLITFILE FILE="C:\FolderName\FileName.txt" DESTINATION="C:\Folder2" SIZETYPE="OTHER" SIZE="20" BYTETYPE="MB" />