Not the best description, i know, but i need some help here
I have a script that pulls out attachments, unzips gz files, which is fine, but it also pulls out regular zip archives. I figured out how to unzip those, my problem is the contents of the zip. it contains 4 files, all with different names (below)
The only file i have to import is the last one (also happens to be the largest in size).
Is there some way that i can just extract that one file and then delete the entire archive? I have a feeling i’ll have to extract all the files into a folder, then check the size on each one, then delete the ones i don’t want, then move that one file back into another folder for to be imported.
This could be useful, if you could check the uncompressed size of all files in a zip you could then extract only the largest file.
-l --list
For each compressed file, list the following fields:
compressed size: size of the compressed file uncompressed size: size of the uncompressed file
ratio: compression ratio (0.0% if unknown)
uncompressed_name: name of the uncompressed file
Php has built in functions for zip files and I havent had any luck in the past in using shell shell functions in a cronjob… Im going be working on it tonight. Ill post what I have if I get it figured out.