Hi, Happy Thanksgiving everybody! I hope all well today and everyone will have a good meal in peace and with your family and friends.

Any way back to busyness....

I have a problem zipping files.

I'd like to Zip some files in some Dirs, not all files but particular files from a directory.

I checked Google already there are a lot of examples of something I do not need and no clear one on how to use IO::Compress::Zip

I found documents about the IO module but it is like reading Latin. It is like they are trying to make everything complicated for some reason and I'm pretty sure it is not and can be written in human language.

Here is the code, I tried to make changes to it but it still zipps the whole directory "H:/Sixshot_logs/Unit_oDay.zip".

Hi, I do not know about IO::Compress::Zip and don't have time now to check it, but Archive::Zip lets you add files one by one (or even a list of files) to a zip archive. So, it is just a matter of preparing a list of the files you want to zip.

Hellow! Here is new code I came up with (thank you Google!), sometime it is working but if I repoint it to diferent directory it does not. I'm trying to zip text files only and each directory contains only log files (.txt) and no sub directories. Here is the error :

Can't call method "desiredCompressionLevel" on an undefined value at C:/Strawberry/perl/vendor/lib/Archive/Zip/Archive.pm line 256.

Here is the code:

#!/usr/bin/perl use strict; use warnings; use Archive::Zip qw/ :ERROR_CODES :CONSTANTS/;