Extraction of a tar file in 2024

Hi everyone,

I could check similar problems in this forum but none of it solved my problem.

Got a tar file and need to extract it to a folder, simple as that.

Well BalaReva.Externals activities couldn’t help for some reason and also they are going to be outdated in the near future since they need Legacy compatibility.

I tried to import SharpCompress.Archives and then use invoke code but couldnt’t import that library.

Is tar still a problem to UiPath in 2024? Can anyone help me?

The solution I found to extract a tar file in 2024:

  1. Install SharpCompress nuget:
    1.1 Dowload the nuget from: SharpCompress Nuget
    2.2 From your manage packages in the project you are working check the local directory from where you are getting the nugets and move it to there

    2.3 Check filtering and reopen the project if you cant find it, then click install and save

Finally using invoke code activity use this code (it is very fast):

        Using archive As IArchive = ArchiveFactory.Open("AbsolutePathOfTheFile")
            For Each entry In archive.Entries
                If Not entry.IsDirectory Then
                    entry.WriteToDirectory("DestinyDirectory", New SharpCompress.Common.ExtractionOptions With {
                        .ExtractFullPath = True,
                        .Overwrite = True
                    })
                End If
            Next
        End Using

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.