Zip files/folders and split into parts
split_filesPacks large files or folders into size-capped ZIP parts for uploads, preserving folder structure and returning each part's path and size.
Instructions
Use when files or folders that are not a .zip are too big to upload (a big log, video, dataset, project folder, several files). Packs the inputs into <archive_name>.zip (folders keep their structure) and splits it into standalone zip parts <= max_mb, in one step, without writing the full zip anywhere permanent. A single file bigger than a part is cut into .001/.002 pieces inside consecutive parts. Returns every part's absolute path and size. Rebuild with the rebuild tool (extract=true gives the files back as a folder).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | Absolute paths of files and/or folders to include. | |
| max_mb | No | Max size of each part in MiB (1 MB here = 1,048,576 bytes). Default 19.5. If your upload limit is in decimal MB (e.g. 20 MB = 20,000,000 bytes) pass max_bytes or a smaller max_mb. | |
| preset | No | Pick the part size from a platform cap. custom (default) uses max_mb/max_bytes. chatgpt-dot: 19,000,000 bytes (under a 20,000,000 byte ChatGPT Dot cap). chat-512: 500,000,000 bytes (under a 512,000,000 byte chat cap; products differ). discord: 24,000,000 bytes for the free 25 MB limit (Nitro is higher and is not this preset). email: 24,000,000 bytes under a common 25 MB attachment cap (other providers differ). github-release: 1,900,000,000 bytes under GitHub's 2 GB release-asset limit. A named preset sets the part size. max_mb is ignored. max_bytes together with a named preset is an error. These limits can change; confirm the current one before a large send. | |
| max_bytes | No | Exact max size of each part in bytes. Overrides max_mb. Do not combine with a named preset. | |
| output_dir | No | Absolute folder to write into. A new sub-folder '<name>_split' (or ' (2)', ' (3)'... if taken) is created inside it. Default: the folder of the input. | |
| archive_name | No | Name for the archive and parts (default: the single input's name, or 'files'). | |
| include_apps | No | Also write AgentParcel-apps.zip (AgentParcel for Windows, Mac and Linux, about 0.35 MB; not a part) so a human recipient can rebuild. | |
| unpack_inner | No | Unpack zips found inside so their files can be spread over parts and opened directly; rebuild puts the inner zips back (same files, verified). | |
| create_output_dir | No | Create output_dir if it does not exist (otherwise that is an error). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| parts | No | ||
| set_id | No | ||
| max_bytes | No | ||
| output_dir | No | ||
| part_count | No | ||
| how_to_rebuild | No |