To access and work with files on Microsoft Windows® and Linux®-based operating systems as part of a chain, add a step with a File Utilities connection command.
To enable these commands, an IT admin first creates a File Utilities connection.
Clean line breaks
To remove extra line breaks from a tabular file's cells, such as within an output from one system to upload to another, use a Clean Line Breaks command.
Properties
Property |
Detail |
Source file |
Enter the tabular file with the broken lines to clean. |
Delimiter |
Select the delimiter used in Source file. |
Outputs
Output |
Output Type |
Cleaned file |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
The command failed |
Copy
To copy files and directories, use a Copy command.
Properties
Property |
Detail |
Source |
Enter the name of the files or directories to move. To match multiple files or directories, use the wildcard characters * or ? . |
Destination |
Enter the new location of the file or directory. |
Overwrite |
To overwrite existing files, check this box. |
Outputs
None
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
14 |
Error |
Source file not found |
15 |
Error |
Failed to write the destination file |
16 |
Error |
Couldn't write the destination file because another file has the same name |
Create file
To create a new file, use a Create File command.
Properties
Property |
Detail |
Text |
Enter the text to add to the file. |
File path |
Enter the path to where to create the file. Optional if using the file as an output for another command in the chain. |
Overwrite |
To overwrite another file that exists at the file path, check this box. |
Outputs
Output |
Output Type |
Created file |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
15 |
Error |
Invalid destination |
16 |
Error |
Couldn't write the destination file because another file has the same name |
Delete
To delete files or directories, use a Delete command.
Properties
Property |
Detail |
File name |
Enter the name of the files or directories to delete. To match multiple files or directories, use the wildcard characters * or ? . |
Outputs
None
Exit Codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
14 |
Error |
Found no files to delete |
17 |
Error |
Failed to delete the specified files |
Delete directory
To delete one or more directories, use a Delete directory command.
Properties
Property |
Detail |
Path |
Enter the name of the directories to delete. To match multiple directories, use the wildcard characters * or ? . |
Recursive |
To recursively delete files or folders in the directory, check this box. |
Outputs
None
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
17 |
Error |
Failed to delete the specified directory |
Find
To search for a text string in a file or set of files, use a Find command.
Properties
Property |
Detail |
Files |
Enter the file or set of files to search. |
Pattern |
Enter the text string to find. |
Pattern syntax |
Select whether to use an exact match or regular expression (regex) syntax for the pattern. |
Case sensitive |
To consider the case of the characters when searching for the pattern, check this box. |
Inverse |
To find all lines that don't match the pattern, check this box. |
Outputs
Output |
Output Type |
File Results |
File |
Results Line Count |
Integer |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
2 |
Error |
Task failed |
14 |
Error |
File not found |
18 |
Error |
Pattern not found |
Find and replace
To perform a find-and-replace in a file, use a Find and Replace command.
Properties
Property |
Detail |
Source |
Enter the name of the file to search. |
Destination |
Specify whether to output the original file or a copy:
- To output the original file with its updated column values, enter the same file as Source.
- To output a copy of the original with the updated column values, enter the name of the new file.
|
Overwrite |
To overwrite an existing destination file, check this box. |
Find |
Enter the text string to find. |
Replace |
Enter the text string to insert at the matched locations. |
Find syntax |
Select whether to use exact match or regular expression (regex) syntax for Find. |
Case sensitive |
To consider the case of the characters when searching for the Find pattern, check this box. |
Outputs
Output |
Output Type |
Replaced result |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
2 |
Error |
Task failed |
14 |
Error |
File not found |
15 |
Error |
Invalid destination |
16 |
Error |
Overwrite error |
18 |
Error |
Pattern not found |
Get file
To retrieve a file from the local file system, use a Get File command.
Properties
Property |
Detail |
Input file |
Enter the file to retrieve and create as an output. |
Data type |
Select the content type of Input File. |
Outputs
Output |
Output Type |
File info |
JSON |
File |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
File wasn't found |
Get file/folder info
To retrieve the file system information for a file or folder, use a Get File/Folder Info command.
Properties
Property |
Detail |
File/folder |
Enter the file or folder to retrieve information about. |
Outputs
Output |
Output Type |
File/folder info |
JSON |
For example: { "absPath": "/tmp", "name": "tmp", "size": 4096, "mode": 2148532735, "modTime": "2018-09-27T19:31:52Z", "isDir": true, "exists": true }
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
Note: This command always succeeds. If the file or folder isn't found, the exists property will be false.
Gunzip file
To unzip a GZIP archive using gunzip
, use a Gunzip File command. For example, use this command to unzip a file output from Oracle® Hyperion Financial Management (HFM).
Properties
Property |
Detail |
Input file |
Enter the GZIP archive to unzip. |
Outputs
Output |
Output Type |
Gunzipped file |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
The command failed |
Gzip file
To compress a file using gzip
, use a Gzip File command.
Properties
Property |
Detail |
Input file |
Enter the file to compress. |
Outputs
Output |
Output Type |
Gzipped file |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
The command failed |
List directory
To list the contents of a directory, use a List Directory command.
Properties
Property |
Detail |
Path |
Enter the path of the directory to list. |
Output format |
Select the format of the output. To include the header and summary information, select Full. |
Outputs
Output |
Output Type |
Found files list |
Array |
Result file |
CSV |
Note: The Found files list output is limited to 500 items; for larger operations, the Result file output should be used instead.
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
14 |
Error |
Directory not found |
List file content
To list the contents of a file, use a List File Content command.
Note: This command can't return individual lines larger than 64KB.
Properties
Property |
Detail |
File name |
Enter the name of the file to inspect. |
Preview lines |
For large files, enter how many of the file's lines to preview. |
Outputs
Output |
Output Type |
File |
File |
File text |
String |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
14 |
Error |
File not found |
20 |
Warning |
File is too large or not human-readable |
Make directory
To create a directory, use a Make Directory command.
Properties
Property |
Detail |
Directory |
Enter the name of the directory to create. |
Outputs
None
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
15 |
Error |
Failed to create directory |
16 |
Warning |
Remote directory already exists |
Move
To move files or directories, use a Move command.
Properties
Property |
Detail |
Source |
Enter the name of the files or directories to move. To match multiple files or directories, use wildcard characters * or ? . |
Destination |
Enter the new location for the file or directory. |
Overwrite |
To overwrite existing files, check this box. |
Outputs
None
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
2 |
Error |
Task failed |
14 |
Error |
Source file not found |
Split file
To split a file into multiple file chunks based on byte size, line count, or regular expression (RegExp) delimiter, use a Split File command. For example, use this command to process smaller files in parallel to help improve performance
Properties
Property |
Detail |
Input file |
Enter the file to split into multiple chunks. |
Split type |
Select how to split the input file—by Byte, Line, or RegExp |
Value |
Enter the value to split the input file by, based on Split type:
- If Byte, enter the maximum file size of the file chunks.
- If Line, enter the maximum number of lines to include in a file chunk.
- If RegExp, enter the regular expression for the line that indicates when to create a new chunk.
|
Include RegExp match |
If Split type is RegExp, select whether to include the line that matches Value in the chunk it generates. |
Outputs
Output |
Output Type |
Split file chunks |
File |
Number of files |
Integer |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
Stack files
To stack multiple asymmetric files on top of one another, use a Stack Files command.
Note: With the Tabular Transformation connector, you can use a Stack Files command to stack symmetric files that all have the same number of columns.
Properties
Property |
Detail |
Input files |
Enter the files to stack. |
Outputs
Output |
Output Type |
Stacked file |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
Strip lines
To remove lines from a file according to the line numbers provided, use a Strip Lines command.
Properties
Property |
Detail |
Source file |
Enter the file to strip lines from. |
Lines to strip |
Enter a list of the lines to strip, as individual lines or ranges. For example, a range of 3:10 removes lines 3 through 10 from the file. |
Outputs
Output |
Output Type |
Strip lines output file |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
2 |
Error |
General failure |
Tar
To create a tape archive (TAR) file, use a Tar command.
Properties
Property |
Detail |
Archive name |
Enter the name of the TAR file to create. |
Source files |
Enter the name of the files or directories to add to the TAR file. To specify multiple files or directories, use commas or wildcard characters. |
Overwrite |
To overwrite an existing TAR file, check this box. |
Outputs
Output |
Output Type |
TAR Archive |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
16 |
Error |
Failed to create archive |
UTF-8 encode
To convert a file to be encoded in Unicode Transformation Format–8-bit (UTF-8), use a UTF-8 Encode command.
Properties
Property |
Detail |
Source file |
Enter the name of the files or directories to move. To match multiple files or directories, use wildcard characters * or ? . |
Source encoding |
Enter the encoding of Source File, such as uft-16 or windows-1251 . |
Outputs
Output |
Output Type |
UTF-8 file |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
2 |
Error |
Command failed |
Untar
To unpack a TAR file, use an Untar command.
Properties
Property |
Detail |
Archive |
Enter the name of the TAR file to unpack. |
Destination |
Enter the name of the directory to unpack the archive to. |
Overwrite |
To overwrite existing files when unpacking the archive, check this box. |
Outputs
None
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
2 |
Error |
Failed to unpack archive |
14 |
Error |
Archive not found |
16 |
Error |
Overwrite error |
Unzip
To unpack a ZIP or GZIP archive, use an Unzip command.
Note: This command requires a GroundRunner.
Properties
Property |
Detail |
Archive |
Enter the name of the archive to unpack. |
Destination |
Enter the name of the directory to unpack the archive to. |
Overwrite |
To overwrite existing files when unpacking the archive, check this box. |
Outputs
None
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
2 |
Error |
Failed to unpack archive |
14 |
Error |
Archive not found |
16 |
Error |
Overwrite error |
Zip
To create a ZIP, GZIP, or GZIP+TAR archive, use a Zip command.
Properties
Property |
Detail |
Archive name |
Enter the name of the archive to create. The file extension determines the compression algorithm:
- For ZIP,
.zip or .z
- For GZIP,
.gzip or .gz
- For GZIP+TAR,
.tgz
|
Destination |
Enter the name of the directory to unpack the archive to. |
Overwrite |
To overwrite an existing archive, check this box. |
Outputs
Output |
Output Type |
Zipped file |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid arguments |
16 |
Error |
Failed to create archive |