I am using ExamDiff Pro 5.0 and I would like to be able to compare ZIP files not as binary files.
The Plug-ins Overview page at
http://www.prestosoft.com/edp_plugins.asp
suggests Info-ZIP's Unzip, but I can't find that anywhere to download it. Besides, on Windows 7 I would
prefer to use the WinZip command line program WZUNZIP.EXE.
I tried this using the following plug-in details
Plug-in: Unzip
Name Filter: *.zip,*.jar,*.war,*.ear
Application: C:\Program Files (x86)\WinZip\WZUNZIP.EXE
Arguments: -d $INPUTFILEPATH $OUTPUTFILEPATH
...but when I try to compare two ZIP files I get an error dialog saying
Plug-in C:\Program Files (x86)\WinZip\WZUNZIP.EXE -d "C:\Users\sachs\Desktop\Book1.zip" "C:\Users\sachs\AppData\Local\Temp\EDA741~1.ZIP" produced no output (its return code was -529697949).
What do I need to do in order to use ExamDiff Pro to compare two ZIP files?
Need help with plugin for ZIP files
-
- New Member
- Posts: 1
- Joined: Thu Jul 21, 2011 5:18 am
Re: Need help with plugin for ZIP files
I'm not familiar with WZUNZIP command line so I'll stick with Info-ZIP's Unzip. An easy way to get it installed to is to reinstall ExamDiff Pro and choose to have plug-ins installed during the setup. You can also download Unzip directly from ftp://ftp.info-zip.org/pub/infozip/win32/
psguru
PrestoSoft
PrestoSoft
Re: Need help with plugin for ZIP files
I had the same problem when I tried to use the WZUNZIP.EXE executable directly in the Application field.
However I was able to set it up successfully by using a small custom WSH script and the following setup:
Plug-in: WZUNZIP
Name Filter: *.zip,*.zipx,*.jar,*.war,*.ear,*.har,*.xpi
Application: cscript.exe
Arguments: "C:\Program Files\ExamDiff Pro\Plug-Ins\wzunzipplugin.js" "C:\Program Files (x86)\WinZip\WZUNZIP.EXE" $INPUTFILEPATH $OUTPUTFILEPATH 0
The file wzunzipplugin.js with the custom WSH script has the following contents:
Another possibility is to use the command line version 7za.exe of the open source file archiver 7-Zip (you can find it at http://www.7-zip.org/):
Plug-in: 7-Zip
Name Filter: *.zip,*.jar,*.war,*.ear,*.har,*.xpi,*.7z,*.gz,*.gzip,*.tgz,*.bz2,*.bzip2,*.tbz2,*.tbz,*.tar,*.lzma,*.rar,*.cab,*.arj,*.z,*.taz,*.cpio,*.lzh,*.lha
Application: 7za.exe
Arguments: x $INPUTFILEPATH -y -o$OUTPUTFILEPATH
Please note that 7za.exe must be on your search path for that setup to work.
However I was able to set it up successfully by using a small custom WSH script and the following setup:
Plug-in: WZUNZIP
Name Filter: *.zip,*.zipx,*.jar,*.war,*.ear,*.har,*.xpi
Application: cscript.exe
Arguments: "C:\Program Files\ExamDiff Pro\Plug-Ins\wzunzipplugin.js" "C:\Program Files (x86)\WinZip\WZUNZIP.EXE" $INPUTFILEPATH $OUTPUTFILEPATH 0
The file wzunzipplugin.js with the custom WSH script has the following contents:
Code: Select all
// ExamDiff Pro Plug-In - Compare ZIP archives with the help of the WinZip Command Line Support Add-On
//
// Call: cscript.exe wzunzipplugin.js <WZUNZIP EXE PATH> $INPUTFILEPATH $OUTPUTFILEPATH 0
WshShell = new ActiveXObject("WScript.Shell");
exeFile = WScript.Arguments(0);
inFilePath = WScript.Arguments(1);
outFilePath = WScript.Arguments(2);
intWindowStyle = WScript.Arguments(3);
cmdLine = "\"" + exeFile + "\" -e -d -yb \"" + inFilePath + "\" \"" + outFilePath + "\"";
//WScript.Echo(cmdLine);
returnCode = WshShell.Run(cmdLine, intWindowStyle, true);
WScript.Quit(returnCode);
Plug-in: 7-Zip
Name Filter: *.zip,*.jar,*.war,*.ear,*.har,*.xpi,*.7z,*.gz,*.gzip,*.tgz,*.bz2,*.bzip2,*.tbz2,*.tbz,*.tar,*.lzma,*.rar,*.cab,*.arj,*.z,*.taz,*.cpio,*.lzh,*.lha
Application: 7za.exe
Arguments: x $INPUTFILEPATH -y -o$OUTPUTFILEPATH
Please note that 7za.exe must be on your search path for that setup to work.
Re: Need help with plugin for ZIP files
Thanks, this is a very good point. We'll switch from Info-ZIP to 7-Zip as it supports more archive formats.
psguru
PrestoSoft
PrestoSoft
Re: Need help with plugin for ZIP files
I have to correct my post concerning 7-Zip a little bit. There seems to be a difference concerning the file formats supported by the GUI and the command line version of 7-Zip. Personally I have only used the command line version 7za.exe as a plug-in for ExamDiff Pro in conjunction with the file formats ZIP, GZIP and TAR. At the moment some file formats like RAR, ARJ and LZH are apparently only supported by the GUI version of 7-Zip (see the 7-Zip help file for more details).
So the Name Filter that I have used above for 7-Zip has to be changed to the following:
Name Filter: *.zip,*.jar,*.war,*.ear,*.har,*.xpi,*.7z,*.xz,*,txz,*.gz,*.gzip,*.tgz,*.tpz,*.bz2,*.bzip2,*.tbz2,*.tbz,*.tar,*.lzma,*.cab,*.z,*.taz
I have tested the setup with some but not with all of the file types in the name filter. So there is no guarantee that it will work in all cases.
So the Name Filter that I have used above for 7-Zip has to be changed to the following:
Name Filter: *.zip,*.jar,*.war,*.ear,*.har,*.xpi,*.7z,*.xz,*,txz,*.gz,*.gzip,*.tgz,*.tpz,*.bz2,*.bzip2,*.tbz2,*.tbz,*.tar,*.lzma,*.cab,*.z,*.taz
I have tested the setup with some but not with all of the file types in the name filter. So there is no guarantee that it will work in all cases.
Re: Need help with plugin for ZIP files
Actually, I tested the 7-zip command-line utility with RAR files, and it worked perfectly. Maybe the 7-Zip documentation was out-of-date.martinm wrote:I have to correct my post concerning 7-Zip a little bit. There seems to be a difference concerning the file formats supported by the GUI and the command line version of 7-Zip. Personally I have only used the command line version 7za.exe as a plug-in for ExamDiff Pro in conjunction with the file formats ZIP, GZIP and TAR. At the moment some file formats like RAR, ARJ and LZH are apparently only supported by the GUI version of 7-Zip (see the 7-Zip help file for more details).
So the Name Filter that I have used above for 7-Zip has to be changed to the following:
Name Filter: *.zip,*.jar,*.war,*.ear,*.har,*.xpi,*.7z,*.xz,*,txz,*.gz,*.gzip,*.tgz,*.tpz,*.bz2,*.bzip2,*.tbz2,*.tbz,*.tar,*.lzma,*.cab,*.z,*.taz
I have tested the setup with some but not with all of the file types in the name filter. So there is no guarantee that it will work in all cases.
psguru
PrestoSoft
PrestoSoft
Re: Need help with plugin for ZIP files
I think we are both right. In my plug-in definition above I have used the 7-Zip Command Line Version 7za.exe available as a separate download (see http://www.7-zip.org/download.html). However in your current plug-in definition on the ExamDiff Pro Plug-ins page (see http://www.prestosoft.com/edp_plugins.asp) it seems that you have used the 7-Zip Console 7z.exe that comes as a part of the "normal" 7-Zip for Windows. When I replace 7za.exe with 7z.exe in my plug-in definition it works for RAR files as well (tested here with 7-Zip for 32-bit Windows). So one has to be careful when choosing the adequate 7-Zip download resp. executable. I have made my tests with the current non-beta 7-Zip version 9.20.