Zip Version 11 (Python)
Action group: File system
Description
The action creates an archive of the specified folder or file.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Path to folder | Path to the directory that should be compressed | Robin.FolderPath | C:\doc\img | No |
Path to file | Path to the file to be archived. | Robin.FilePath | No | |
Save to | Directory, where the archive should be placed | Robin.FolderPath | C:\doc\img | Yes |
Archive name | Name for the archive. For BZIP2 and XZ formats, the entered information will be ignored and the archive will be created with the name of the selected file. | Robin.String | Yes | |
Archive format | Archive format. 7z is default. | Robin.String | No | |
If duplicated | Action to perform if an archive with the same name already exists in the folder. Default is rename - a number will be added to the name. | Robin.String | No | |
Password | Password that will protect access to the created archive. Password protection is supported in 7z, zip, and rar formats. For other formats, the entered information will be ignored and the archive will be created without a password. | Robin.Password | No | |
Archive size | The size of the archives into which the file or folder will be divided during archiving. If the field is not filled in, the division will not occur and only 1 archive will be created. | Robin.Numeric | No | |
Units of measurement | Units of measurement for the «Archive size» field». The default value is Mb. | Robin.String | No | |
Results | ||||
Archive path | Full path to the created archive | Robin.FilePath | ||
Archive Collection | A collection containing the full paths to the created archives. The action returns this result only if the «Archive Size» field has been filled in. In this case, the result «Archive Path» will be empty. | Robin.Collection |
Special conditions of use
The robot will return an error if:
- incorrect archive size is specified (<=0)
Logic of operation of the action when splitting the archive into parts:
- The submitted archive is split into parts with the specified size. For example, the archive is 900 bytes, the size of the archives is specified as 200 bytes. 5 archives will be created (4 of 200 bytes and 1 of 100 bytes). The paths to them will be specified in the collection.
Splitting an archive into parts supports the following formats: 7z; zip; tar.
Example of use
Task
You need to create archives based on the file path.
Solution
Use the "Zip" action.
Implementation
- Move the "Zip" action to the workspace.
- Set the parameters of the "Zip" action.
- Click on the "Start" button in the top panel.
Result
The program robot completed successfully.
Archives have been created in the required folder.
Обзор
Инструменты контента