# Robot activity descompress .bz2 problem

Hey guys!

I have a folder with different files to unzip, including some with .bz2 format and others with .zip format. For files in .zip format I have no problem decompressing them with UiPath activities, but the .bz2 format is being impossible for me to unzip, any suggestions? I would like it to be through an activity, but I have not found any that decompresses this format.

Regards!

If you have a separate third-party tool (for example https://www.7-zip.org/ ) that can decompress .bz2 files, you may create a UI automation workflow that can right-click on the respective file and access the right menu context by clicking on it and then choosing the Extract option.

Example that you need to automate:

You may try also the command line approach for the unattended automation:

7z x archive.bz2


More details:

Example (Inside the text.log.bz2, I have text.log file):

I am adding the environment System Variable Path for the 7z.exe file location as below:

From Start, I am accessing the Edit system environment variables

Edit the System variables → Path → New → C:\Program Files\7-Zip (path of the 7z.exe file)

Run the below command in a cmd.exe

7z x "C:\Marian\DownloadPackages\text.log.bz2"


Explanation: extracts all files from the archive text.log.bz2 to the current directory.

Results of the extracted activity:

If you need to extract all the files from the archive text.log.bz2 to a specific folder (for example to C:\Marian\DownloadPackages\ExtractedFiles), you may use the below command:

7z x "C:\Marian\DownloadPackages\text.log.bz2" -o"C:\Marian\DownloadPackages\ExtractedFiles"


Example: