The /system/ftp container includes functions used to connect to an FTP or FTPS server, and perform operations such as uploading, retrieving, and deleting files, making or deleting remote directories, and others.
Paths in FTP functions
Some FTP functions have a Working Directory parameter. This parameter is common to many FlowForce functions. If you set the Working Directory, remember that all local paths supplied as parameters to the FTP function must be relative, not absolute. For example, when uploading a file, you can enter C:\Upload as Working Directory and file.txt as Source file. The final source path will become C:\Upload\file.txt.
In addition, some FTP functions have a Directory on host parameter that plays the same role as Working Directory, on the remote FTP server. Therefore, if you set the Directory on host, all remote paths supplied as parameters to the FTP function must be relative, not absolute. For example, when uploading a file, you can enter uploads as Directory on host and file.csv as Target file. The final target path will become /uploads/file.csv.
This is also important if you configured jobs as File System Triggers or HTTP Triggers. Such jobs have a triggerfile parameter that supplies the path of the file that triggered the job. If you intend to use the triggerfile parameter in any FTP function, remember that its path is absolute.
To obtain the file name with extension from the triggerfile, use the following FlowForce expression:
For an example, see the FTP store function.
The following FTP functions accept wildcards as parameters:
When using such functions, you can enter the following wildcards:
Match zero or more characters.
*.htm will match home.htm and index.htm
Match any single character.
*.xm? will match index.xml and project.xmi
The + (one or more) wildcard is not supported. Instead, you can use ?* to achieve the same effect. For example, *.c?* will match .cs , .cp and .csproj files but will not match .c files.