|
File System - Base64 encode/decode |
Declaration
<AMFILESYSTEM ACTIVITY="file_encryption_base64" SOURCE="text" DEST="text" OVERWRITE="YES/NO" ACTION="text (options)" ENCODING="text (options)" />
Description
Encodes a file to or decodes a file from the Base64 file format using the specified encoding scheme.
Practical Usage
See Description.
Parameters
General
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Encode/Decode | Text (options) | Yes | Encode | ACTION="decode" | Specifies the encoding or decoding action to take on the file.
The available options are:
|
Source | Text | Yes | (Empty) |
|
The path and filename of the file to encode or decode. This can be a fully qualified path and file name (preferred) or a single file (requires use of the File System - Change folder activity). Wildcard characters (for example, * or ?) may be used to specify all files matching a certain mask. Multiple files and/or file masks can be specified by separating each entry with a pipe character (|) (for example, c:\temp\*.txt|c:\backup\*.bak). See File Masks & Wildcards for more details. |
Destination | Text | Yes | (Empty) |
|
The destination folder (and optionally, file name) of where to save the encoded or decoded file. This can be a fully qualified path or folder/file name only. Folders that do not exist are automatically created at runtime. |
Overwrite if file already exists | Yes/No | No | No | OVERWRITE="YES" | If set to selected, existing files with matching names in the Destination folder are overwritten. If disabled (default), files with matching names are not overwritten, however, an error will occur during runtime stating a file with the same name already exists. |
Encoding | Text (Options) | No | Default |
|
The
encoding scheme to use to encode or decode the Source file. The available
options are:
|
Example
- The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
- Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.
Description
This sample task encodes a file to the Base64 file format using the ASCII scheme and then saves it under a new file name.
<AMFILESYSTEM ACTIVITY="file_encryption_base64" SOURCE="C:\temp\file.txt" DEST="C:\temp\decoded.txt" OVERWRITE="YES" ENCODING="ascii" />