splitting or merging parts of .zip or .tar.gz files
Discussion
We have software which runs environmental reports on customer servers and then splits the resulting .zip file in to 1.9MB parts for easy emailing.
Now I understand how to merge the parts together - using "type newfile >> targetfile" - but when I've finished (10 files in all) I can't seem to open the result - usually winzip tries to make me add the file I'm opening to another .zip file
Do you think something went wrong between customer creating the files and me merging them? Invalid archive sometimes pops up too!
Now I understand how to merge the parts together - using "type newfile >> targetfile" - but when I've finished (10 files in all) I can't seem to open the result - usually winzip tries to make me add the file I'm opening to another .zip file
Do you think something went wrong between customer creating the files and me merging them? Invalid archive sometimes pops up too!
You sure he didn't split the file *then* zip them?
Did you download these off the web? Many browsers remove the file extensions (.zip, .gz, etc) without actually uncompressing the files, so Windows gets confused as to what they are. (The Linux "file" command will tell you what they are.)
Did you download these off the web? Many browsers remove the file extensions (.zip, .gz, etc) without actually uncompressing the files, so Windows gets confused as to what they are. (The Linux "file" command will tell you what they are.)
zumbruk said:It's our software which splits them... Gives them tags like file_aa_ac.zip, file_ab_ac.zip and file_ac_ac.zip
You sure he didn't split the file *then* zip them?
Did you download these off the web? Many browsers remove the file extensions (.zip, .gz, etc) without actually uncompressing the files, so Windows gets confused as to what they are. (The Linux "file" command will tell you what they are.)
Not sure how to help on the zip front, but for splitting files into smaller compressed forms I would always recommend WinRAR, you can specify the size of each part and it can create an automatic (.exe style) rar file, all you have to do is click it and it merges all the seperate RAR files back into their original form.


If the software that produces the file creates a big zip then splits it into 1.9M chunks then you should be able to join them back together and unzip.
copy /b fil1+file2+file3+file4+file5 bigzipfile.zip
If it creates spanned 1.9M zip chunks then you shouldn't need to join them they just need to have name s like file.Z01 file.Z02 etc with the last being file.zip ( I think - havent' had to do that for a while). When you open the last file it reads the others automatically
If it creates 1.9M zips then you can't join them you need to extract each indiviually.
copy /b fil1+file2+file3+file4+file5 bigzipfile.zip
If it creates spanned 1.9M zip chunks then you shouldn't need to join them they just need to have name s like file.Z01 file.Z02 etc with the last being file.zip ( I think - havent' had to do that for a while). When you open the last file it reads the others automatically
If it creates 1.9M zips then you can't join them you need to extract each indiviually.
Didn't the old pkzip utillity use to have the abillity to split a large zip into chunks so that it could be copied across several floppy disks?
There might be a switch with in winzip to do this.
Have you tried opening just the first zip file, it might automatically go looking for the remaining parts.
There might be a switch with in winzip to do this.
Have you tried opening just the first zip file, it might automatically go looking for the remaining parts.
malman said:
If the software that produces the file creates a big zip then splits it into 1.9M chunks then you should be able to join them back together and unzip.
copy /b fil1+file2+file3+file4+file5 bigzipfile.zip
I suspect you may have put your finger on it there. It used to be the case that MS-DOS put a CTRL-Z on the end of files, then packed up to the next block (512 byte) boundary with whatever happened to be in the buffer at the time. The '/b' switch ('binary') to "copy" told it not to do that. I wonder if Windows is still doing this and hence corrupting the files when they are concatenated back together ... ?
zumbruk said:
malman said:
If the software that produces the file creates a big zip then splits it into 1.9M chunks then you should be able to join them back together and unzip.
copy /b fil1+file2+file3+file4+file5 bigzipfile.zip
I suspect you may have put your finger on it there. It used to be the case that MS-DOS put a CTRL-Z on the end of files, then packed up to the next block (512 byte) boundary with whatever happened to be in the buffer at the time. The '/b' switch ('binary') to "copy" told it not to do that. I wonder if Windows is still doing this and hence corrupting the files when they are concatenated back together ... ?
Yeah its supposed to auto switch between ascii / binary mode but I'd rather know what its doing rather than guess
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff


