08-25-2023 10:41 AM
I have used OpenG ZIP to zip a directory with only files and it works just fine. However, when I try to zip a directory with files and SubDirectories (and SubSubDirectories) I get an Error 8 result. I have the include subdirectories input set to TRUE and it still results in an Error 8.
Thanks,
Doug
Solved! Go to Solution.
08-25-2023 01:24 PM
Looks like setting the password to be some value is what is causing the error. Seeing how I need to use the password feature is this possibly a bug?
08-26-2023 04:00 PM
@DougFerguson wrote:
Looks like setting the password to be some value is what is causing the error. Seeing how I need to use the password feature is this possibly a bug?
I think it is more likely to be an "unimplemented feature" that the OpenG folks did not think to provide. What kind of password feature do you want? One that is compatible with WinZIP (if known)? You could always (I suppose) create your own encrypting/decrypting ...
Bob Schor
08-27-2023 02:45 AM
I remember running into problems too and I believe I had the same issue. In my case, I switched to using 7-Zip with the 7Z format, although I don't remember the exact reason for not using ZIP in 7Z. I believe it had some quirk with how it did the password protection.
You should be able to use the 7-Zip EXE and DLL next to your code without installing it. I used the following command with Format Into String and the System Exec VI:
"cmd /c 7za.exe a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -p"%s" "%s" "%s"".
These are the switches:
a Add (dir1 to archive.7z)
-t7z Use a 7z archive
-m0=lzma2 Use lzma2 method
-mx=9 Use the '9' level of compression = Ultra
-mfb=64 Use number of fast bytes for LZMA = 64
-md=32m Use a dictionary size = 32 megabytes
-ms=on Solid archive = on
-mhe=on 7z format only : enables or disables archive header encryption
-p{Password} Add a password
The three parameters at the end are the password, the full path of the created file and the path of the source folder.
08-27-2023 09:24 AM
@Bob_Schor wrote:
@DougFerguson wrote:
Looks like setting the password to be some value is what is causing the error. Seeing how I need to use the password feature is this possibly a bug?
I think it is more likely to be an "unimplemented feature" that the OpenG folks did not think to provide. What kind of password feature do you want? One that is compatible with WinZIP (if known)? You could always (I suppose) create your own encrypting/decrypting
Well bug or unimplemented feature is of course debatable. It's definitely an omission that I hadn't yet noticed.
Included VI will fix that problem. It is in 2009 format and replaces the VI at <user.lib>\_OpenG.lib\lvzip\lvzip.llb\ZLIB Store File__ogtk.vi
08-28-2023 02:12 PM
Well done and thank you for the quick resolution. Solution is exactly what I need for this project.