Announcement

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

  • GZip files in Windows

    Hey Everyone,

    I recently received thousands of .csv.gz files that I would like to unzip in a Stata program (these files were originally created on a UNIX server). However, I am using a Windows server. I've tried things like: shell gunzip `file', and several other workarounds. Any other ideas?

    Any help is appreciated. Thanks so much!

  • #2
    Looks like the download from http://www.gzip.org/ will work. Realize that you will either need to fully specify the path, or more simply, place the relevant files in the same folder as the .gz files you want to decompress.

    Comment


    • #3
      BTW -- if they're all in one directory, don't bother with a loop. "gzip *.gz -d" will do them all at once.

      And actually, any zipfile utility for Windows with a command-line interface should do the job anyway. Stata's zip command is zip-specific, but Winzip, WinRar, 7Zip will all do the job.
      Last edited by ben earnhart; 17 Nov 2014, 12:22. Reason: *. gz not *.gx

      Comment


      • #4
        Originally posted by esteinma View Post
        I recently received thousands of .csv.gz files that I would like to unzip in a Stata program (these files were originally created on a UNIX server). However, I am using a Windows server. I've tried things like: shell gunzip `file', and several other workarounds. Any other ideas?
        Hi, this an interesting problem. You may be wiling to have a look at this post concerned with unziping files in Stata. Interestingly, it appears that are utilities that facilitate handling of the gzip files, have a look at the IDEAS website but they may not be sufficient to what you want to achieve. If you are considering downloading other software, presumably it is worth to consider unpacking the files via R (as discussed here). You could then quickly amalgamate everything into one data frame and export to Stata dta format for further analysis without too much hassle.
        Kind regards,
        Konrad
        Version: Stata/IC 13.1

        Comment

        Working...
        X