Hi dampsey , I used ur code , its running fine without error but txt files are not extracting

Posted on 2009-04-16
Last Modified: 2013-12-17
Hi dampsey ,

                     Thank you for ur reply . I have export.rar file  in  this path "D:\Web\VENUS\MINERVA\UPLOADFILES\export.rar" .This rar file having five txt files. I have to unrar that five text file to this path   "D:\Web\VENUS\MINERVA\OLD\" . I copied that unrar.exe in my web application(SANDS). i didnt created any folder, directly i added to (D:\softworkingfolder\SANDS\)
 I used ur code , its running fine without error but txt files are not extracting to  "D:\Web\VENUS\MINERVA\OLD\"

   string arguments = " a -ep \"" + @"D:\Web\VENUS\MINERVA\OLD\" + "\" \"" + @"D:\Web\VENUS\MINERVA\UPLOADFILES\export.rar" + "\"";
            ProcessStartInfo inf = new ProcessStartInfo("UnRAR.exe", arguments);
            inf.WorkingDirectory = @"D:\softworkingfolder\SANDS\" + "\\";
            inf.WindowStyle = ProcessWindowStyle.Hidden;

            Process islem = new Process();
            islem.StartInfo = inf;
Question by:dilipsjain
    1 Comment
    LVL 39

    Accepted Solution

    you use "-ep", that means "exclude paths". But you are saying that you actually want to extract to that path, instead of excluding it from unrarring. Then, the "a" command is from rar.exe, not from unrar.exe, and means to add to the archive.

    Assuming that you want to extract tot he directory you mentioned, here's an alternative commandline:

    // unrar e source.rar target\directory\
    string arguments = @" e ""D:\Web\VENUS\MINERVA\UPLOADFILES\export.rar"" ""D:\Web\VENUS\MINERVA\OLD\""";
    ProcessStartInfo inf = new ProcessStartInfo("UnRAR.exe", arguments);
    //.... etc

    Open in new window


    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    In my previous article ( we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now