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

Is there a way to unzip a zip file into a directory, but only do so for updates files (I mean the compressed files inside the zip)? I have a huge directory of files there, and only about 20% are different.

Preferably using command line, but it's optional. I use Windows XP.


share|improve this question
Could you clarify? DO you only want to unzip if the .zip has changed or do you want to unzip only the files in the .zip that have changed? Also, what OS are you using? – Puddingfox May 23 '10 at 21:06
I update it. Thanks. – R S May 23 '10 at 21:25
up vote 1 down vote accepted

With the winzip commandline addon, you can use the -n option:


Unzip only newer files. This option updates existing files if the archived file is newer and creates new ones if they do not already exist.

wzunzip -n "c:\my documents\" c:\semesters\spring05  

This example will extract, from c:\my documents\, ONLY those files that are newer than the files that currently exist in c:\semesters\spring05 OR that do not already exist in the c:\semesters\spring05 folder.

You might want to combine it with the -o option - "Overwrite existing files without a prompt (automatically reply "Yes" to each overwrite prompt)."

share|improve this answer
The equivalent for *nix users is : unzip -u – HRJ Nov 18 '15 at 4:40

Heres an idea for starters that someone else will need to finish:

  1. Find a zip program that list the files in a compressed archived.
  2. Have that list all the files and the timestamp
  3. Use a scripting language (python,batch,whatever) to compare the modified time of those files with the files in the directory
  4. Have the scripting language generate the arguments to add those files into the archive

Alternatively, break down your archive folder.

share|improve this answer

I am arriving 4 years too late, but hey - better late than never.

Here is a project to unzip only modified files:

From TFA: "A unzip tool written in C#, which checks MD5 hash before unzipping each file. --- If the hash matches previous version, we skip the extraction of this file. --- Hashes are stored in NTFS Alternate files streams (on Linux, one should use xattr API, but this is not implemented here)"

share|improve this answer

You must log in to answer this question.

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