How to Compare Files Inside Zip Files Without Extracting Them

0 Comments
Editor Ratings:
User Ratings:
[Total: 0   Average: 0/5]




This tutorial explains how to compare files inside zip files, without opening them.

Normally we have to first extract zip files to see and manually compare the data available in those files. We can also use zip archive software to preview a zip file without extraction, but then also we need to compare the files manually. To make this zip files comparison a bit easier, I have found two different methods.

These methods will help you compare files inside the two zip archives without any manual comparison and extraction. The main benefit is that when you have made copies (different zip archives) of a folder and want to check the differences, these methods can help you generate the results quickly. Let’s start with the first method.

Method 1: Compare Files Inside Zip Archives using a Free Jar Comparer Tool:

Jar Comparer (also known as Jarcomp) is a portable to compare two zip files (or Jar files) automatically. Java must be installed on your PC to run this tool. It scans the files available in both the zip files and shows the comparison result. You will be able to easily see the file difference (if a file was added or removed) and the size change before and after removing/adding the files.

Once you have downloaded this small tool, open it and add two zip files (same or different) using Compare… button. After that, it will show the output quickly.

Jar Comparer- interface and result

This tool can also help you check MD5 hashes of the zip files. So, even if files and their sizes are same in two different zip files, you can generate MD5 hash to find if both the archives are identical or not.

Method 2: Compare Files of Two Zip Archives using A Free Command Line Tool:

zipdiff (alpha) is a free command line tool to help you easily compare files of two zip archives. Apart from the comparison, it can also generate the report in HTML, TXT, or XML format that you can use for later analysis. A normal user might feel that using a command line is a bit difficult thing, but it ain’t so. This tool is really easy to use. You have to execute a simple command. Here are the steps to help you easily compare files of two zip archives using this tool:

Step 1: First you have to grab the zip file of this tool. Extract the zip in a folder and then access “zipdiff-0.4\build” folder. After that, you need to paste the zip files that you want to compare in the same “build folder”.

paste zip files in build folder

Step 2: Open Command Prompt window. Add “java -jar“. After that, drag n drop zipdiff (executable jar file) from build folder to Command Prompt window. See the screenshot below:

enter the path

Now continue the command by entering “-file1 first zip file path and file format -file2 second zip file path and file format -outputfile output file path (it must be the same build folder path) and output file format (HTML, TXT, or XML) -comparecrcvalues -comparetimestamps. So your whole command would be like:

java -jar E:\zipdiff-0.4\build\zipdiff.jar -file1 E:\zipdiff-0.4\build\firstfile.zip -file2 E:\zipdiff-0.4\build\secondfile.zip -outputfile E:\zipdiff-0.4\build\outputfilename.html/txt/xml -comparetimestamps -comparecrcvalues.

Press the enter to execute the command. It will compare both archives and store the report in the build folder.

html report

Above you can see the HTML report generated by me for two zip file comparison using this tool.

You can also try some other file comparison software:

Verdict:

Both these methods are really simple and good to compare zip archives without extraction. However, the second tool is more useful because it generates the report which you can share or use anytime you want. Still, if you don’t want to use command line tool then go for the first software.

Editor Ratings:
User Ratings:
[Total: 0   Average: 0/5]