GunzipFile
Summary
Use the GunzipFile
function to uncompress the contents of a GZIP file located on the Connect SFTP file system. The GZIP compressed file can contain only a single archive file, which may be a tar ball archive or a regular file, such as a CSV-format file.
Syntax
GunzipFile(FilePath='<path to source gzip file>, Destination='<target gunzip directory location>' [, Overwrite=<true|false>])
Parameters
Parameter | Description |
---|---|
FilePath | (Required) The source GZIP file directory location and file name. The source file must have been created with the GZIP compression algorithm and the source file name must have one of the following file extensions:
For example:
|
Destination | (Required) The destination directory on the SFTP file system to which the function extracts the uncompressed GZIP file. The target file name is determined by the name of the source GZIP file minus the “.gz” or other GZIP file extension.
The function automatically creates the destination directory (and any sub-directories) if they do not already exist. For example:
|
Overwrite | (Optional) Overwrite the target file if it already exists on the SFTP file system. The default is false. |
Return Type
The function uncompresses the contents of a GZIP file to the Xactly SFTP server file system. The function creates any directories and subdirectories associated with each destination path if not already found on the file system. The function returns a status result set containing information related to the command execution.
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.
Note that GunzipFile
can uncompress, but not unpack, “*.tgz” and “*.tar.gz” tarred GZIP archives. Use GunzipFile
followed by the UntarFile
file function to uncompress and untar a tar archive file.
Examples
call GunzipFile(FilePath='/inbound_files/raw_orders.csv.gz', Destination='/ready_for_processing', Overwrite=true);
Related Functions
GzipFile
TarFile
UntarFile
UnzipFile