Skip to content

Instantly share code, notes, and snippets.

@nik312123
nik312123 / split.py
Created August 3, 2023 20:50
Splits a folder into zip files of a certain MB size or lower. If a file is larger than the limit, then it will have its own zip file.
#!/usr/bin/env python3
# Copyright Nikunj Chawla 2023
import sys
import os
import re
from zipfile import ZipFile, ZIP_DEFLATED
from math import ceil