Upload folder
Action group: FTP
The action uploads a local directory to an FTP server
Parameters
Input parameters:
Context - the context of connection to the FTP server;
Local directory - the path to the directory to be uploaded to the server;
Remote directory on FTP server - the path to the folder on the remote server where the directory will be uploaded;
Rewrite - a boolean variable, if its value is "true", then the folder with the same name will be overwritten in the directory;
Existing only - a boolean variable, if the value of which is "true", then download only those files that exist in the local destination directory. Otherwise, download all files. The default value is "false". Available only with the "Overwrite" option enabled;
Only new - boolean variable, if its value is "true", then overwrite only newer existing files and all files that are not yet in the local directory. Otherwise, download all files. If "Existing only" is enabled, overwrite only newer versions of existing files, without adding those that don't already exist. Only available with "Overwrite" enabled;
Exclude - name of files that will be excluded from downloading;
Include subdirectories - boolean variable, if its value is "true", the search is performed inside the current directory and through all its subdirectories. If the value is "false", the search is performed within the current directory. The default value is "false";
Keep directories structure - a boolean variable, if the value of which is "true", then save the directory structure equally in the source and target locations. If the value is "false", then the directory structure is not saved. Available only with the "Include subdirectories" option enabled. The default is "false";
Depth - the maximum depth of viewing subdirectories. The default value is 5. Use -1 to specify unlimited depth. Available only if the value of "Include subdirectories" is "true".
Settings
Property | Description | Type | Example of filling in | Obligatory to fill in the field |
Parameters | ||||
Context | Unique identifier of the FTP session in the context of which the action will be applied | FTP | FTP context | Yes |
Local directory | Local directory to upload to the FTP server | FolderPath | C:\doc\img | Yes |
Remote directory on the FTP server | Target directory to which the local directory will be uploaded | String | Yes | |
Rewrite | If true, files and subdirectories will be overwritten. Otherwise, no overwriting is performed. The default is false. | Boolean | true | No |
Existing only | If true, load only those files that exist in the destination directory. Otherwise, load all files. The default value is false. Available only with the Rewrite parameter enabled | Boolean | true | No |
Only new | If true, overwrite only newer existing files and all files that are still No. Otherwise, load all files. If "Existing only" is enabled, overwrite only newer existing files, without adding those that are still No. Available only with "Rewrite" enabled | Boolean | true | No |
Exclude | Files to ignore during upload. To specify more than one file, use wild-cards (* or ?) | String | No | |
Include subdirectories | If true, the search is performed inside the current directory and all its subdirectories. If false, the search is performed only within the current directory. The default value is false | Boolean | true | No |
Keep directories structure | If true, save the directory structure equally in the source and target locations. If false, the directory structure is not saved. Available only with the "Include subdirectories" option enabled. Default is false | Boolean | true | No |
Depth | Maximum depth for viewing subdirectories. Use -1 to specify the depth with no limit. Available only with the "Include subdirectories" option enabled | Numeric | No |
Special conditions of use
None.
Example of use
Task: connect to FTP server, upload folder to server.
Solution: use the actions "Connect", "Upload folder", "Disconnect".
Implementation:
- Assemble a robot scheme consisting of the actions:
- Set the parameters for the "Connect" action.
- Set the parameters for the "Upload folder" action.
- Set the parameters for the "Disable" action.
- Click on the "Start" button in the top panel.
Result:
The software robot has completed successfully. The folder is uploaded to the server.