| Purpose: | Break a file into multiple smaller files. |
| Format: | SPLIT [/= /L[=n] /B=n /C=char,position,count /from=format /to=format /N /S=n] inputfile [outputfile] |
/B(yte split)
/C(haracter split)
/L(ine split)
/from (input file encoding)
/N(o BOM)
/S(tart file number)
/to (output file encoding)
inputfile - The file to split
outputfile - The base name for each output file
Usage:
You can split files at a given size, at a given character, or at a given number of lines. SPLIT supports ASCII, UTF-8, UTF-16LE, UTF-16BE, UTF32LE, and UTF-32BE files.
inputfile can be a filename, the clipboard (CLIP:), or a pipe (specifying CON: as the input file name). If you are splitting CLIP:, do not specify a /from= argument; CLIP: is automatically handled as Unicode (UTF-16LE).
SPLIT will append a "%3.3d" format specifier to outputfile; i.e. outputfile of "foo.txt" will generate output files named "foo.txt.000", "foo.txt.001", etc. If you don't specify outputfile, SPLIT will use inputfile as the base name. If you specify CON: or CLIP: as the input file name, you must specify an output file name.
You must specify one of /L, /B, or /C.
UTF-16 and UTF-32 files will be converted to UTF-8 when the files are split. If you want to convert the split files back to UTF-16 / UTF-32 you will need to specify an output format. (For example, "/to=utf16=le".)
Options:
| /B | Split at the specified number of bytes. Also supports k (* 1,000), K (* 1024), m (* 1,000,000) and M (* 1,048,576) suffixes. The maximum split size is 2Gb. |
char can be a literal character, a hex value (0xnnn), or a special character in single quotes (for example, '|', '<', '>', '&', etc.). If you want to use a whitespace character (space, tab, return, linefeed) you need to use the hex value format.
position can be:
0 - Split before the character (it goes in the next file)
1 - Split after the character (it remains in the first file).
2 - Split on top of the character (the character is removed)
position will default to 1.
count - The number of times to see the split character before splitting. count will default to 1.
* (auto detect)
UTF-16LE
UTF-16BE
UTF-32LE
UTF-32BE
UTF-8
ANSI
ASCII
CPnnn, where nnn is a Windows code page.
| /L | Split at the specified number of lines (default 1000). Also supports k (* 1,000), K (* 1024), m (* 1,000,000) and M (* 1,048,576) suffixes. The maximum split lines is 2,000,000,000. |