TarFile
Summary
Use the TarFile
function to create a tar file archive from files and directories found on the Xactly SFTP server file system.
Syntax
TarFile(FilePath='<full-path-to-source-file>' or Directory='<source-directory>', Destination='<target-gzip-file-path>' [, Overwrite=<true|false>] [, Recursive=<true|false>)
Parameters
Parameter | Description |
---|---|
FilePath | (Required if the Directory parameter is not used.) Specifies the source file to the tar utility. 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. Use * for wildcard pattern matching.
For example:
|
Directory | (Required if the FilePath parameter is not used.) All files within the specified directory are used with the tar utility. |
Destination | (Required) The target directory path or directory path and optional output file name. The function creates the directory structure and target tar file automatically if they do not already exist.
It is not necessary to specify the name of the target tar file. The function automatically appends “.tar” to the source file name if a directory path is specified without a filename. You can set a custom target file name by adding the extension “.tar” or “.TAR” to the For example:
|
Overwrite | (Optional) Overwrite the target tar file if it already exists on the SFTP filesystem. The default is false. |
Recursive | (Optional) Recursively include subdirectories and files under the main directory in the output tar file. The default is false. |
Return Type
The function creates a new target tar file and the directory path on the Xactly SFTP server file system. The function returns a status result set containing information for the source files included in the target 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 TarFile(Directory='/output_files', Destination='/for_download/my_tar.tar');
call TarFile(FilePath='/output_files/*.csv', Destination='/for_download/my_tar.tar');
call TarFile(Directory='/output_files', Destination='/for_download/my_tar.tar', Recursive=true, Overwrite=true);