1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

unzip not using specified path

Discussion in 'Support' started by Phileosophos, Mar 2, 2011.

  1. Phileosophos

    Joined:
    Aug 28, 2008
    Messages:
    86
    Likes Received:
    2
    I've had a batch file for some time that unzips Microsoft Office *.docx, *.xlsx, and other OpenXML files. It creates a subfolder and then uses the unzip command to extract the contents of the archive to said subfolder. Ever since I updated to TCMD 12.x from TCMD 11.x the same batch file is no longer working. The contents of the batch file are:

    set xdir=%@path[%@full[%1]]%@name[%1] UNZIPPED
    md "%xdir"
    unzip /d %1 "%xdir" *
    unset xdir

    The problem is that the unzip command is no longer using the specified path. In fact, I can't get the unzip command to extract any archive to a path I supply. Has something changed? Is it broken? Thanks in advance.
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,792
    Likes Received:
    29
    Looks fishy to me. Below, the files were actually unzipped to v:\. (And where did "Indexing" come from?)

    Code:
    v:\> unzip /d sysutils.zip "sysutils UNZIPPED"\
    => V:\sysutils UNZIPPED\sysutils.txt
    => V:\sysutils UNZIPPED\os.txt
    => V:\sysutils UNZIPPED\sysutils.dll
    Indexing V:\
    
    v:\> dir "sysutils UNZIPPED"\
    
     Volume in drive V is DATA           Serial number is c007:d3e4
     Directory of  V:\sysutils UNZIPPED\*
    
    2011-03-02  14:30         <DIR>    .
    2011-03-02  14:30         <DIR>    ..
                     0 bytes in 0 files and 2 dirs
         7,037,362,176 bytes free
     
  3. Phileosophos

    Joined:
    Aug 28, 2008
    Messages:
    86
    Likes Received:
    2
    That's exactly the sort of behavior I see: the command "talks" like it's putting things in the right directory but it doesn't. As to the indexing, that's a new feature as I understand it; it will automatically index the files/folders its unzipping unless you explicitly suppress that behavior with a command-line switch.
     
  4. Phileosophos

    Joined:
    Aug 28, 2008
    Messages:
    86
    Likes Received:
    2
    Might anyone from JP Soft weigh in on this? Is it a bug? Is it intended functionality? Am I misunderstanding something? Thanks.
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,732
    Likes Received:
    81
    It's a bug in the zip library. I have a workaround for the next build (which will be out this week).
     
  6. Phileosophos

    Joined:
    Aug 28, 2008
    Messages:
    86
    Likes Received:
    2
    Excellent! I was hoping to hear something like that. I'll look forward to it.
     

Share This Page