How to create a ZIP file with only AutoHotkey code
Posted: 01 Oct 2022, 19:20
Hi Folks,
I'm using the FileCopyDir capability (new in v1.1.34+) to unpack ZIP files, retaining the source folder/subfolder structure. Now I'm looking for AHK code to create ZIP files. It must be able to pack a folder and all its subfolders to an unlimited depth, including empty folders, such that the new FileCopyDir capability can unpack the ZIP file into the original folder/subfolder structure (btw, FileCopyDir handles empty folders fine). It must work on W7 through W11.
The thread referenced above has a post referring to some old threads. I tried the code in several posts there, as well other code from searching this forum, but haven't found anything yet that works well and meets my objectives. I wrote some AHK code that runs 7-Zip (7za.exe) to create ZIP files (works fine), and I saw some forum posts with code that calls PowerShell to do it, but I don't want to use either of those methods.
Any ideas? Thanks much, Joe
I'm using the FileCopyDir capability (new in v1.1.34+) to unpack ZIP files, retaining the source folder/subfolder structure. Now I'm looking for AHK code to create ZIP files. It must be able to pack a folder and all its subfolders to an unlimited depth, including empty folders, such that the new FileCopyDir capability can unpack the ZIP file into the original folder/subfolder structure (btw, FileCopyDir handles empty folders fine). It must work on W7 through W11.
The thread referenced above has a post referring to some old threads. I tried the code in several posts there, as well other code from searching this forum, but haven't found anything yet that works well and meets my objectives. I wrote some AHK code that runs 7-Zip (7za.exe) to create ZIP files (works fine), and I saw some forum posts with code that calls PowerShell to do it, but I don't want to use either of those methods.
Any ideas? Thanks much, Joe