Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What I need to do, at the command line, is:

  1. Extract the contents of a a ZIP archive.
  2. Change an arbitrary number of the extracted files.
  3. Repeat step 1, but because it is a huge archive, only extract the archived copies of the files changed in step 2 which is much faster.

Ideally the extraction in step 3 would do something like a checksum on the files on disk and only extract those where the file in the archive has a different checksum. Or maybe compare the date changed stamp on the disk file.

At the minute I use pkzipc.exe which is the command-line version of PkZip. I can't see a way to do it with this though. You can extract files from the archive that are newer than the disk files, but what I want is the opposite of that in a sense.

share|improve this question

plenty useful zip tools and tips on this web site:

Using zip and unzip on the windows command line

download zip.exe and unzip.exe from this website and copy the 2 files into your windows directory, run zip or unzip (without parameters) from the command prompt to see all options.

share|improve this answer
    
Thanks Molly, unzip.exe doesn't appear to offer the specific functionality I need though. – Alan B Jan 7 '10 at 9:19
    
it does, "-f" aka "freshen existing files, i.e., extract only those files that already exist on disk and that are newer than the disk copies." – akira Apr 29 '10 at 18:59

I've been looking for a program that would use the CRC32 in the zip file to know if a file had changed, but if all you care for is a date/time stamp and size, TreeComp could work for you.

share|improve this answer

Hmm, maybe I'm misunderstanding what you're trying to do, but why don't you just keep a second copy of the files that you're going to change (in step 2)?

Is there any particular reason you need to re-extract?

7-Zip has a command-line version that I'd suggest looking at regardless, I prefer it over all the other windows archiving tools I've used.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .