BSPLIT
— Split files into
smaller files.
Syntax:
BSPLIT
/D:
dir /E /F:
n /N:
n /O /P /Q /S:
size /X:
prefix
filename…
/D: dir | output directory |
/E | no error messages |
/F: n | extension numbering format |
/N: n | number of splits |
/O | overwrite existing files |
/P | output to source file’s path |
/Q | quietly |
/S: size | split size |
/X: prefix | extension prefix |
filename… | files to split |
BSPLIT
divides a file into multiple smaller files. You can split at a
specified size (/S:
), or into a specified number of files (/N:
).
You cannot combine /N:
and /S:
.
You must supply a filename. Wildcards and directory aliases are supported, and you may have more than one filename on the command line. The output directory defaults to the current directory.
BSPLIT
is short for “binary split”. It splits files by byte size.
It does not support splitting by lines or characters. If the input file contains text it
may be divided within a line, or possibly even within a character.
/D:
dir specifies
the directory that the split files will be written to. If this directory does not exist,
BSPLIT
will attempt to create it for you.
/P
writes the split files to the same directory
as the original file. It’s like a shorthand for
/D:"%@PATH[
filename]"
.
If you don’t specify either /D:
or /P
, the default is to write
the split files to the current directory.
/F:
n lets you change
the way the output files are numbered. The formats are:
0 | two decimal digits |
1 | three decimal digits |
2 | four decimal digits |
3 | two hexadecimal digits |
4 | three hexadecimal digits |
5 | four hexadecimal digits |
6 | two letters (base-26) |
7 | three letters (base-26) |
8 | four letters (base-26) |
Add 32 for uppercase. If you don’t specify a format, the default is three
decimal digits. If you specify a prefix with /X:
, the prefix will be
inserted at the start of the extension.
/S:
size specifies the
size of the output files. You may give the size as:
n | bytes |
nk | thousands of bytes |
nK | kilobytes (1,024 bytes) |
nm | millions of bytes |
nM | megabytes (1,048,576 bytes) |
ng | billions of bytes |
nG | gigabytes (1,073,741,824 bytes) |
/N:
n instead splits
the file into n more-or-less equally-sized pieces. You cannot
combine /N:
and /S:
.
rem Break BigFile into 500-kilobyte files:
bsplit /s:500K bigfile
rem Break BigFile into four more-or-less equal files:
bsplit /n:4 bigfile