Search the Community
Showing results for tags 'zip compression'.
-
Recommendations for zipping files and folders
takg posted a topic in AutoIt General Help and Support
I have been using _Zip.au3 to put files in a zip container. I discovered a problem recently where the AutoIt script executable I created wasn't exiting after the zipping process was completed. The zip file appears to be created correctly but the executable just doesn't exit. Adding an Exit at the end of the script did nothing and there doesn't appear to be any errors except that the script appears to be paused (indicating a problem before the last line of code). This problem appears to be fixed by adding a Sleep(500) line after the _ZipCreate like this: $Zip = _Zip_Create($myzip) Sleep(500) _Zip_AddItem($Zip,$myfolder) I have no idea why this worked but perhaps if someone can explain why it works I will live with this workaround. In any case, after reading all the comments in the forum (see thread started by torels with title "ZIP.au3 UDF in pure AutoIt") about _Zip.au3 I am wondering if I should be using it at all. It might be more desirable to use a command line from an AutoIt script to do this. Also, I am hesitant to use _Zip.au3 because it doesn't appear to be distributed with AutoIt (even though it has been around since 2008), it may have been copied from someone else, and it doesn't appear to have been updated since 2008. Please recommend one of these options: 1) Continue using _Zip.au3 2) Use a different UDF for zip compression 3) Use a command line that just uses the zip features built into Windows. Before I consider this, I'd have to make sure the same command works in all current versions of Windows. Also, examples would be helpful (I saw an example on the thread listed above but can't find it now). 4) Other: it would be nice to have an option that can password protect the zip container. Does _Zip.au3 have it? I think it was recommended but it doesn't show up in _Zip.au3 feature list. Thanks in advance for your recommendations.