Splitting a Text File (using a user-specified prefix and sequence for the new filenames)
When splitting a file in Text mode, the Split Files tool can operate in two sub-modes:
With Meta Data and Without Meta Data.
In both modes, filenames are created using a combination of user-specified prefix
and unique sequence number.
-
With Meta Data
If the first line of any input file contains meta data of the form:
N, fldName1, fldName2, fldName3 ...
where N is the number of lines to be processed (i.e. the number of lines following the meta data line) and fldName1, fldName2,
etc. are identifiers
subsequent lines must be enclosed by parentheses and contain the same number of comma-separated fields.
When a valid meta line is present, the Split Files tool provides a number of optional output file format
transformations. The options include the ability to save the output files as:
- Ansi
- Unicode
- UTF-8
- HTML
- XML
Example
3, id, surname, forename, midname, instrument
(1, "Arrau", "Claudio", "", "Piano")
(2, "Lucia", "Paco", "de", "Guitar")
(3, "Oistrakh", "David", "", "Violin")
The meta line above describes an input file that will be split into 3 separate output files, each of which will contain 5 fields.
Note
If you wish to split an input file into a number of XML files, each field name must be unique.
-
Without Meta Data
If the first line of any input file does not conform to the above meta data format, a user-specified number of characters or lines
from the input file is written to the output files.
As with the meta data format, the Split Files tool provides a number of optional output file format
transformations. The options include the ability to save the output files as:
- Ansi
- Unicode
- UTF-8
- HTML
- XML
|