Thursday, 22 February 2018

command line - Unzip only updated files


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.


Thanks.



Answer



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



-n


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\spring2007.zip" c:\semesters\spring05  

This example will extract, from c:\my documents\spring2007.zip, 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)."


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...