Zip Plugin for AutoIt V3.
It adds the following functions:
- _ZipCreate($NewZipFile) Returns a handle to the zip.
- _ZipAdd($hFile,$SourceFile,$FileNameInsideZip) Needs handle from _ZipCreate.
- _ZipAddDir($hFile,$DirToAdd,$Recursive) Needs handle from _ZipCreate 1 use recursion 0 don't.
- _ZipAddFolder($hFile,$FolderName) Creates an empty folder in the zip Needs handle from _ZipCreate.
- _ZipFormatMessage($ErrorCode) Returns the message that corresponds with the $ErrorCode.
- _ZipClose($hFile) Closes the Zip archive. Needs handle from _ZipCreate.
- _ZipUnZip($ZipFile,$Dest) UnZips the archive to the specified folder.
- _ZipUnZipItem($ZipFile,$FileNameInsideZip,$Dest) UnZips the specified file to dest.
_ZipGetList($ZipFile) Retrieves file info from zip.- _ZipGetCount($ZipFile) Retrieves then number of items in the zip.
- _ZipGetItemInfo($ZipFile) Return a ptr to the file info a specific item.
- _ZipAddFileToZip($ZipFile,$FileToAdd,$FileNameInsideZip) adds a file to an already existing zip.
- _ZipDeleteFile($ZipFile,$FileNameInsideToDelete) Deletes a file inside the archive.
- _ZipPluginAbout() Returns "About" message string.
The UDF contains a number of helper function.
- _ZipItemInfo2Array($ZipFile,$iIndex) Retrieves file info from zip and return as 1 Dim array.
- _ZipList2Array($ZipFile) Retrieves file info from zip for all items and returns a 2 Dim array
- _ZipGetItemInfoFromPtr($ptrZipInfo) Converts struct from ptr [ provided by _ZipGetItemInfo() ] to 1 Dim array. (Internal use.)
The original CodeProject source archive is included with the plugin archive as is an Au3 example script. There is also a script that can be compiled into an exe for a Code::Blocks tool to zip the current project. The CodeBlocks_Tools.jpg shows the settings. Adjust the location of the exe accordingly.
You can get the latest version here.
Here is a direct link to Au3_Zip_1.0.408a.zip
Enjoy,
eltorro
Edit: Added _ZipUnZipItem()
Edit: Change the name of the download
Edit: Removed _ZipGetList() -Plugin
Added _ZipGetCount() -Plugin
_ZipGetItemInfo() -Plugin
_ZipItemInfo2Array() -UDF
_ZipList2Array() -UDF
Edit: Added checks for file existence
Check if file is a zip.
Edit: Fixed unneeded zip check in _ZipAddDir.
Edit: Uploaded files to server. Replaced incorrect Au3 include file in zip package.
Edit: Fixed crash with bad or otherwise incorrect zip file.
Edit: Fixed extraction of 0 byte file.
Edit: Fixed failed check for source folder.
Edit: Replaced _ZipPlugin.pll.au3 with correct file.
Edited by eltorro, 17 June 2008 - 09:16 PM.






