PDA

Click to See Complete Forum and Search --> : Multi Part ZIP Files


Disiance
Jun 30th, 2008, 05:33 PM
Does anyone know of a way to extract multi-part ZIP files with PHP (or, in Python, if you happen to know)?

For instance, I have a large file that I zip, but I want to distribute in small chunks, so instead of file.zip, I would have file.zip, file2.zip, and file3.zip.

PHP, with it's default library, cannot handle this.

Anyone know of a way to do this?

penagate
Jun 30th, 2008, 08:14 PM
exec('cat file1.zip file2.zip file3.zip > file.zip && unzip file.zip');

Disiance
Jul 1st, 2008, 11:17 AM
I've tried that, and also tried the same method on Windows using "copy /b file1 + file2 dest.zip" command.

The message I get when opening a combined file (in WinRAR) is:
"Seek error in the file ###
An attempt was made to move the file pointer before the beginning of the file."

I can test the uncombined archive files, and extract its contents, without any problems. Any other ideas? Any ways to test the contents to make sure the format is what's expected?