How to split a zip file across INDEPENDENT volumes

I have about 12 GB of image tiles made up of about 2 million files. I'd like to zip these up to make transferring them to a server simpler. I just plan on storing the files in the zip files for transferring, no compression. Helm is present on the web server and can handle unzipping files.

I'd like to point a program at all these files in one go and get it to zip them up into files of approx 1 GB each, but each zip file needs to be independent of the others.

I have 7-zip installed with supports splitting across volumes, but these volumes are dependent upon one another to be unzipped.

Anyone have any suggestions? Thanks in advance!


Solution 1:

The freeware on Windows called "Spinzip" should do the work for your purpose ! ;) http://skwire.dcmembers.com/wb/pages/software/spinzip.php

It is based on IZARCC (automatically included in Spinzip). You have to check but the full original path may be kept in the zipped files !

See ya

Solution 2:

I'm not aware of a program that can do that, since if you are making one zip in multi-volumes they will all be related. Your best bet may be to make 12 folders and put a GB in each one, then zip the folders individually.

Solution 3:

In the end I created a quick python script to split the files in to sub directories for me before zipping each individually.

In case it's useful to anyone else, here's my script:

import os
import csv
import shutil

def SplitFilesIntoGroups(dirsrc, dirdest, bytesperdir):
    dirno = 1
    isdircreated = False
    bytesprocessed = 0

    for file in os.listdir(dirsrc):
        filebytes = os.path.getsize(dirsrc+'\\'+file)

        #start new dir?
        if bytesprocessed+filebytes > bytesperdir:
            dirno += 1
            bytesprocessed = 0
            isdircreated = False

        #create dir?
        if isdircreated == False:
            os.makedirs(dirdest+'\\'+str(dirno))
            isdircreated = True

        #copy file
        shutil.copy2(dirsrc+'\\'+file, dirdest+'\\'+str(dirno)+'\\'+file)
        bytesprocessed += filebytes

def Main():
    dirsrc='C:\\Files'
    dirdest='C:\\Grouped Files'

    #1,024,000,000 = approx 1gb
    #512,000,000 = approx 500mb
    SplitFilesIntoGroups(dirsrc, dirdest, 512000000) 

if __name__ == "__main__":
    Main()