...
...
Panel | |
---|---|
|
Overview
Managed File Transfer operations are handled as file transfer requests that are registered in the system.
A transfer request record is created either when there is a download or an upload initiated by a partner client that is connected to a local UDMG server or when a UDMG client is triggering a request on the interfaces: CLI, REST API, UAC UDMG File transfer task (see GET a file from an SFTP server). Usually, a transfer request is associated with a single file, where the filename is provided by the client and the path is determined by the transfer rule.
A wildcard transfer is a special kind of transfer that can include a wildcard in the file name parameter, it is possible to request the upload or download of multiple files towards a remote partner with this wildcard mode.
When the transfer is executed, it will perform a LIST operation over the file path and look for all the files that match the pattern. Afterward, a new "child" transfer is created for each of the files using the same configuration as the wildcard transfer (rule, direction, partner, account).
Wildcard transfers are supported in transfers where UDMG is acting as a client and only for the SFTP protocol.
Wildcard
For files, wildcards can be used only in:
Source file specifications, not destination file specifications. (Under some operating systems, it is possible for * and ? to be valid characters in a file name. If they appear in a destination file, they are treated as file characters, not as wildcards.)
File name portion of file specifications, not as part of the directory.
Types of Wildcards
There are two types of wildcards:
Asterisk (*) wildcard matches zero or more characters, except the character '/'.
Question mark (?) wildcard matches a single character, except the character '/'.
Character range ([abc] or [a-c]) wildcard matches a single character in the range.
Examples
Here are some examples of wildcard matching given the following file names in the source directory:
test.txt
test1.txt
test2.txt
test3.txt
test4.txt
test.bin
test1.bin
test2.bin
...
Transfer Info and Metadata
The wildcard transfer, also called "parent" transfer, can be distinguished from a normal transfer because it will have certain transfer info entries:
Name | Value | Example |
---|---|---|
udmg_xfer_wildcard | Flag indicating a transfer in wildcard mode | true |
udmg_xfer_childIDs | List of child transfer request IDs | 161, 162 |
udmg_xfer_files | List of matching file names | winceclient.png, winceclientSmall.png |
The "child" transfers can be distinguished from a normal transfer because they will have certain transfer info entries:
Name | Value | Example |
---|---|---|
udmg_xfer_parentID | Reference to the parent transfer ID | 160 |
Any additional transfer info entry present in the wildcard transfer will be copied to the "child" transfers.
It is set with the flag udmg_xfer_wildcard:true
in the custom transfer information fields.
Examples
Example of a command line with the UDMG client to fetch the files matching the pattern “wince*.png” from the remote partner “rebex” (see Tutorial - Download Multiple Files with Wildcard Mode)
Panel |
---|
|
Example of a command line to register the same request on the REST API with the curl tool, notice the transferInfo
field:
Panel |
---|
|
The result is the creation of a transfer record with the wildcard pattern, which executes as follow:
Connect to the remote partner
List the files that are matching with the pattern on the remote path
Create a child transfer record for each of the files. This transfer is set to planned status and is independant independent from the parent request.
Terminates and keep the list of files and child requests in its transfer info metadata
Additionally, the file size field is set to the number of matched files (and child requests)
The child requests as processed independantly independently from the parent request and can be paused, resumed or cancelled on their own.
...
In this example, the transfer with ID 160 is the parent request, with the wildcard pattern, while 161 and 162 are the children requests for the 2 matching files: 'winceclient.png' and 'winceclientSmall.png'.
The transfer record metadata is appended with the following fields:
Name | Value | Example |
---|---|---|
udmg_xfer_wildcard | Flag indicating a transfer in wildcard mode, only for parent. | true |
udmg_xfer_childIDs | List of child transfer request IDs, only for parent. | 161, 162 |
udmg_xfer_files | List of matching file names, only for parent. | winceclient.png, winceclientSmall.png |
udmg_xfer_parentID | Reference to the parent transfer ID, only for child. | 160 |
Example of transfer metadata for the parent, on the Admin UI and from the command line:
...
Panel |
---|
|
Example of transfer metadata for the child, on the Admin UI and from the command line:
...
Panel |
---|
|
...