GzipFile
Summary
Use the GzipFile
function to compress a single file located on the Connect SFTP file system. The function supports GZIP compression.
Syntax
GzipFile(FilePath='<path to source file>', Destination='<target gzip file path>' [, Overwrite=<true|false>])
Parameters
Parameter | Description |
---|---|
FilePath | (Required) Specifies the source file to compress. The value can be set to the source file name (if found in the root directory) or the entire directory path to the source file.
For example:
|
Destination | (Required) The target gzip directory path or directory path with optional file name. The functions creates the directory structure and target gzip file automatically if they do not already exist.
It is not necessary to specify the name of the target gzip file. The function automatically appends “.gz” to the source file name if a directory path is specified. You can set a custom target file name by adding the extension “.gz” or “.GZ” to the For example:
|
Overwrite | (Optional) Overwrite the target gzip file if it already exists on the SFTP filesystem. The default is false. |
Return Type
The function creates a new target gzip file and the directory path on the Xactly SFTP server file system. The function also returns a status result set containing information for the source files included in the target ZIP file.
Details
Connect is integrated with the Xactly SFTP server, connectftp.xactlycorp.com.
Connect file commands can read and write files and manipulate directory structures located on the SFTP file system. An SFTP account is not required to use these commands. However, an account is required to access the file system using SFTP clients. Contact Xactly Customer Support to set up an SFTP account, if necessary.
You can use an SFTP client to get and put files on the Xactly SFTP server. Valid SFTP login credentials are required to transfer files using SFTP. Connect users, however, do not need SFTP credentials to use Connect file functions with files located on the SFTP server.
Examples
call GzipFile(FilePath='/extracts/payfile.csv', Destination='/outbound_files/', Overwrite=true);
call GzipFile(FilePath='/extracts/payfile.csv', Destination='/outbound_files/a_custom_target_filename.csv.gz', Overwrite=true);