tags:

views:

311

answers:

4

Hi.

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.

+3  A: 

http://www.respower.com/page_tutorial_unrar

So the commands are: rar and unrar

Source: I googled it.

marcc
you need winrar installed !
Yassir
A: 

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

Yassir
+7  A: 

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

Jorge Israel Peña
A: 

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.

BeowulfOF