Zip / Unzip options within an APP?

If your app is not ABC, you might need to set ABCLinkMode and ABCDLLMode.

It gets a little more complicated for Multi-DLL, but if you just have an EXE (and the switches aren’t already set), try setting the switches in your project

My project is ABC, also Multi-DLL.

1 Like

For tomorrow I can prepare an example. I’m going to make sure that it compile and run as abc or not. regards

1 Like

ZIP.ZIP (5,9 KB)

This is taken from a working program. Should work. If you have problems send pm.

1 Like

The code creates a zip archive file with a file size, but the archive is empty.
Also, the program throws an error when it tries to archive a file that is currently open. Is there a way to archive a file even if it is currently open?

well, here it works ok. Send me your code to check it.
Open files, I think that needs special treatment. Perhaps it depends on the share mode of then open file. I didn’t need to zip open files so I haven’t analyzed it.

is there a way to archive a file even if it is currently open?

Try making a copy of the open file and archiving the copy?

Hi Everyone,
Yes, my test also. “windows explorer” shows zip file empty. :sad_but_relieved_face:

ZipTest.zip (236.1 KB)

Attached my test APP.
Hope someone with insight can assist.

Clarion 11.1
(Also with StringTheory, just for debuging)

F

I’ve fixed the class and your demo to work properly. I added ODS to the class as well for better tracing. The main issue was the class was using the full path and name of the pdf being added, but the function just expects the name with no path.

I updated the routine in your code to make sure the path to the PDF files has a trailing
ZipTest.zip (157.4 KB)

I hope that helps
Mark

1 Like

ZFile = ‘C:\TEMP\ZipFiles\Tiras-’& random(1000,99999) &‘.zip’ - Need full path name

1 Like

Thank you VERY MUCH Mark.

That was kind of you. Works well now.
Tracing helps as well.

Any help on the UNZIPPING? :pleading_face: :folded_hands:

F

Can you also manipulate/display a progress bar for big files @Mark , please? :pleading_face: