How do you Un RAR Archive Files?

My project works fine now, but when there is a .rar (or .cbr), it skip the uncompress step.

Do you have a FREE solution to achive that ?

NB: I do not tested 7z files by lack of a test file. I do not yet do an internet search to see if I can download some for testings.

TIA

(post deleted by author)

There is no built-in unrar for MacOS or Linux.

I believe Windows 11 will extract rar in Explorer on newer builds, so there may be an API route there, but you also can’t count on everyone having newer builds of Windows 11.

Your best option will be a helper app, 7z is a good one on all platforms (p7zip for Linux). You can use it to create your own rar for testing too. But 7zip has a BSD 3-clause License so you’ll need to make sure you adhere to it if you distribute it with your app.

In App Store you find “The Unarchiver”. Does all kinds of files.

For Xojo apps, check the Archive classes in MBS Xojo Compression Plugin.

After around 1 hour of public transportation, the answer is:

RAR_FI.Open

RAR_FI is a FolderItem that point to the target folder where the decompress have to be stored.

A simple test validate the guess.

Of course, I have an application who deals with RAR | CBR files.

For 7z compressed archives, Xojo does not expand them, so I will use the trick above.

I have it. I wanted to use FolderItem.Unzip, so I started there.

I’d better started using FolderItem.Open and don’t waste my time:

I had to create a Folder and pass that to Unzip to get the files in a Folder.

I hope my recent entries will help people in the future.

BTW: when in your computer the file you want to open using FolderItem.Open there is no application to run and open it, the OS provide a Dialog providing options, just like if you click in the file.

I duplicate a txt file and changed its name / added a crazy Extension:

Then I double clicked on it:

Do the same to get your language texts (or LiveText on macOS, OCR on other platforms)..