Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Unzipping in IDL

  1. Jul 6, 2011 #1
    Heads up: I am working in IDL (which I have never done before)

    I am trying to get old code which works on a 32-bit machine to work on 64-bit and am having trouble with PKUNZIP and PKZIP which aren't compatible with a 64-bit OS (Windows 7). I have 2 executable files, PKUNZIP and PKZIP, which are used in the IDL code as

    Code (Text):
    cd, skypath, current=thisone
    spawn,'del skyfiles.*'
    spawn,'del unpack.zip'
    spawn, 'rename '+zipfile+' unpack.zip'
    spawn, 'pkunzip -o unpack.zip'

    ...

    spawn,'pkzip skyfile.zip skyfiles.rad skyfiles.trn skyfiles.dep skyfiles.uwr'
    spawn,'rename skyfile.zip '+'SKY'+zipfile
    Since PKUNZIP and PKZIP don't work, does anyone know of any alternatives that can? I've tried WinRAR and WinZip, but I couldn't get them to work. I believe that they wouldn't work due to the fact that they open a GUI which asks where to unzip rather than simply unzipping to a folder named in the IDL code. Does anyone have any experience in messing with stuff like this?

    Thanks in advance.
     
  2. jcsd
  3. Jul 7, 2011 #2
    Fixed it. Downloaded zip and unzip with Cygwin, tar'd their folders and included a shortcut to the executable files in place of PKUNZIP and PKZIP. Works fine (if cygwin1.dll is included in the same directory as the original executable)
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Unzipping in IDL
  1. Histograms in IDL (Replies: 0)

Loading...