This activity is used to compress a folder during the execution of a robot. We can
zip a file or directory within a shared folder, granted we have access to it.
Technical Reference
INPUT |
FileList: Specify the declared variable name in this box. Refer to the tip below to see how it can be done. It accepts “List of string” datatype. |
|
FileName: Specify the name of the file or folder that you want to zip. It accepts only “String” datatype. |
||
FolderPath: Specify the directory path in which the file to be zipped is located. It accepts only “String” datatype. |
||
Overwrite: Check this box if you want to overwrite a file or folder if it is already available in the path that you have chosen. |
||
Password: If there is any password for the zipped file or folder, enter the same here. It accepts only “String” datatype. |
||
SavePath: Specify the path in which the zipped file or folder must be saved. It accepts only “String” datatype. |
||
MISC |
Display Name: Displays the name of the activity. The activity name can also be customized which will help in troubleshooting. |
|
Mode: Choose from the drop down. Folder – Choose this to zip a folder. This is the default selection. |
||
SkipOnError: Specify the Boolean value as “True or False.” |
||
Version: It specifies the version of the FS automation feature in use |
||
OUTPUT |
Result: It helps to view the execution state of the activity. It returns the values in Boolean format. |
*Represents mandatory fields to execute the workflow.
Let’s see how to use this activity,
1. Create a new solution or open an existing solution.
2. Drag and drop the Zip activity.
3. Navigate to the property section and specify the details in the boxes based
on your requirement.
a. To zip a list of files, declare a variable as shown above in the tip and enter
that variable in the FileList box.
b. In the Filename box, specify the name of the file to be zipped.
c. If we are going to zip a folder, specify the folder name in the FolderPath
box.
4. To see the output, declare a variable in the result box of the output segment.
Here it is “zip”. This is in “Boolean” datatype.
5. Drag and drop a writeline activity and enter the variable here to see the
success state of the activity. The syntax is given with the extension “.ToString”
to convert the “Boolean” datatype to “String” datatype.
Example: Zip.ToString
6. Execute the workflow.
Click here to see how the activity works in a workflow.