The /system/sftp container includes functions used to connect to an SSH server with SFTP support. The /system/sftp functions enable you to perform operations such as uploading and retrieving files, creating and removing directories, deleting files, and others. The /system/sftp functions require that the connection to the server be established in a separate FlowForce step. Once you have established the SFTP connection, you can use it in subsequent steps (see screenshot below).
The sample job above has two execution steps:
•The first step establishes the SFTP connection and declares this object as my_sftp_connection (first red rectangle in screenshot above).
•The second step uses the connection established in the first step (second red rectangle in screenshot above), retrieves all the files from the current directory of the SFTP server, and outputs them to the local working directory.
The following SFTP functions accept wildcards as parameters:
When you use functions with wildcards, you can enter the following wildcards:
Matches zero or more characters.
*.htm will match home.htm and index.htm
Matches any single character.
*.xm? will match index.xml and project.xmi
The + (one or more) wildcard is not supported. Instead, you can use ?*. For example, *.c?* will match .cs , .cp and .csproj files but will not match .c files.