Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to extract rar files with stata?

    How to extract rar files with stata?For example,I can use unzipfile to extract the zip file.What about rar fiels? Best wishes!

  • #2
    https://www.stata.com/statalist/arch.../msg00416.html

    Comment


    • #3
      Thank you a lot,Jesse! I use this command : !"C:\Program Files\WinRAR\WinRAR.exe" financial_data.rar
      to unzip the file financial_data.rar,then I should click the botton “extract” in the WinRAR,so that I can
      unzip the file financial_data.rar



      [IMG]file:///C:/Users/SUMMER~1/AppData/Local/Temp/msohtmlclip1/01/clip_image002.gif[/IMG]


      Comment


      • #4
        Use UnRar instead of WinRAR:
        https://www.rarlab.com/rar_add.htm
        which is free and available for multiple platforms.

        To extract everything the syntax is
        Code:
        unrar e archive.rar
        and you don't need to click anything manually.

        Comment


        • #5
          Thank you so much,Sergiy~
          However,the command unrar is unrecognized r(199);
          Best regards!

          Comment


          • #6
            unrar isn't a Stata command; it is part of other software you must install.

            Comment


            • #7
              Thank you,Nick!

              Comment


              • #8
                Originally posted by Zhifan Tian View Post
                How to extract rar files with stata?For example,I can use unzipfile to extract the zip file.What about rar fiels? Best wishes!
                you need to use the shell command to use winrar software to unzip file. The unzipfile command is used to unzip the file saved in .zip format i.e. when you compress a file using the windows default compression software. however when you are using winrar, it will save file in .rar extention. For that use following command, just change the path and file name
                shell set path=”C:\Program Files\WinRAR”; %path% & unrar e “file2.rar” details are on the following link: https://thedatahall.com/how-to-unzip-files-in-stata/

                Comment

                Working...
                X