There are multiple ways of extracting ZIP file using Blue Prism for example write scripting using VB, C#, J# or using 3rd party tools or running a batch file. Let's try one of the simple methods extracting file.
We are going to run a command in command prompt (CMD) and check the extracted file. Now again there are two ways comes in my mind:
I have taken three variables to store following information and all variables are TEXT type:
Add an Action Stage in Object Studio and Select "Utility - Environment" Business Object and select Action "Start Process". It requires to arguments to be passed as command which we need to execute and arguments which should be passed with command.
Points to be taken care in above placed information:
We are going to run a command in command prompt (CMD) and check the extracted file. Now again there are two ways comes in my mind:
- I can open command prompt and send key strokes to run a command.
- Execute command by Blue Prism only
I have taken three variables to store following information and all variables are TEXT type:
- ZIP File - "c:\Vaibhav\sample.zip"
- Destination Path - "-oc:\Vaibhav"
- Zip Command - ""c:\Program Files\7-Zip\7z.exe""
Add an Action Stage in Object Studio and Select "Utility - Environment" Business Object and select Action "Start Process". It requires to arguments to be passed as command which we need to execute and arguments which should be passed with command.
- Check out the Data Type specified above Zip Command. It contains all text in double quotes while are used two times. This is intentional as when this string must be typed in prompt it must be in quotes as path as spaces in it.
- Make sure while consolidating arguments you must provide spaces between each argument.
- Supply Password as an argument (Ideally it must be used as Password datatype but this is for illustration)