Results 1 to 8 of 8
  1. #1
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Free command-line UNZIP program required

    Request for recommendations for a free command-line unzip single-executable-only program which can be set to write the unzipped files into a target subdirectory other than the current directory AND which can be set to unzip only new (i.e. not already present in the target directory) or updated (i.e. present in the target directory but older) files into this directory.

    I just cannot get PKUNZIP 2.04g or PKZIP 2.5 to do this.

    The commandline version of WinZip comes with a whole raft of DLLs and other stuff I don't want.

    UNZIP (from info-zip.org) does not give errorlevel 11 (which PKUNZIP does) when there are no newer or updated files in the zipped file. (Yes, I need to know this...)

    CAM Unzip appears to give no errorlevels.

    Furthermore, I do not want to copy files between the current directory and the target directory; I need the files to be written in a single execution of ??unzip.exe.

    Nothing to it, really!

    Thanks

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  2. #2
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Free command-line UNZIP program required

    Maybe 7-zip might be worth a look. It seems to largely satisfy your wishlist, but I can't see any reference to errorlevels returned by the commandline version.

    Alan

    Also, try here for a long list of possibilities.

  3. #3
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Free command-line UNZIP program required

    Thanks, Alan - I've just spent about an hour wrestling with the 7za command line syntax! (Some) errorlevels seems to be produced, but (like you) I cannot find any documentation about them.

    Thanks for the list of alternative unzippers - I think I've been there with most of them...

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  4. #4
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Free command-line UNZIP program required

    John,

    Did you solve it? I was thinking <img src=/S/headthrob.gif border=0 alt=headthrob width=15 height=15> that (being a .BAT wizard) you might be able to capture the size of the target folder to an environment variable then compare this with its size, similarly captured, after the unzip operation. This could serve as your "indicator" to see if any files had been added/ replaced. It's a bit limited, but there must be some small freebie floating around, that does nothing but return a DIR size in number of bytes. If you work something out, please post the solution - it's an interesting problem.

    Alan

  5. #5
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Free command-line UNZIP program required

    Alan

    Yes, there are at least two ways fo resolve the problem using FOR /F, one just extracting the size(s) using DIR and the other looking for the presence of the lines saying "expanded" for each file. If you're really interested I'll post it when I get a version working on Monday or Tuesday...

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  6. #6
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Free command-line UNZIP program required

    John

    Yes, I am interested in all things of the "advanced" batch file nature. Look forward to seeing it.

    Alan

  7. #7
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Free command-line UNZIP program required

    Alan

    Here's the appropriate fragment (from a seven-page BATch file!) which indicates how I'm dealing with the absence of an errorlevel which would indicate that no new or updated files were found in the ZIP file!

    John
    Attached Files Attached Files
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  8. #8
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Free command-line UNZIP program required

    Thanks John. I'll study it and try and get my nut around what you've done.

    Alan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •