Gold
Gold

Reputation: 62554

What is the command-line for rar and unrar?

What is the command-line for rar and unrar?

I need to rar test.txt to test.rar, and to unrar test.rar to test.txt.

I need to put this functionality in a C# WinForm.

I have Windows XP and WinRar install

Thanks in advance.

Upvotes: 1

Views: 2186

Answers (4)

Oliver Friedrich
Oliver Friedrich

Reputation: 9250

You should clear out your question and tag it correctly.

Do you ask for the command line parameters for winrar? For this a simple rar /? should help you out.

Or do you ask for a way to unrar packages via .NET-libraries?. For that the other answers give you lot of information already.

Anyway, your commenter is right, do not shell out to programs, that do not come with the system, unless your installer ensures the other program to be there.

Upvotes: 0

Hannoun Yassir
Hannoun Yassir

Reputation: 21222

SharpZipLib might help (I'm not sure if they support RAR but you can compress the files in other formats i.e ZIP)

Upvotes: 0

Jorge Israel Peña
Jorge Israel Peña

Reputation: 38626

Take a look at SevenZipSharp which supports RAR format as well as others. This way you won't have to rely on external applications.

Upvotes: 7

marcc
marcc

Reputation: 12409

http://www.respower.com/page_tutorial_unrar

So the commands are: rar and unrar

Source: I googled it.

Upvotes: 4

Related Questions