Spliting output text into multi-files(Horizontal and Vertical)
Replace Pioneer - text/binary/web file - Batch search,replace,convert,rename,split,download    Input_Output_file_name_control  Merging_multi-files_using_batch_mode_Horizontal_and_Vertical_ 

 

Open Replace Dialog, there is a "Write Mode" selection before output file window, which providing 3 choices for file splitting:

 

1. (<)Split output into multi-files by bytes/chars/lines/files

 

2. (<<)Split output into multi-files by paragraph delimiters

 

3. (<<<)Split output into multi-files by column(word delimiters)

 

 

 

 

If user want to split output file to many files, each file contain a paragraph, user should select (<<)Split by Paragraph (How to define a paragraph, see Defining a Paragraph ).

 

If user want to split output file to many files, each file contain a column, user should select (<<<)Split by column (Column is separated by Word boundary, see Defining a Word ).

 

If user want to split output file by number of Bytes/Chars/Lines/Files, user should select (<)split by bytes/chars/lines/files.

 

 

How to Control split by how many bytes, chars, lines or files:

 

 

Open "Settings" page in "Replace Dialogue"(or open Settings->Settings Menu), following dialog pop-ups:

 

 

User can enter number of lines/bytes/chars/files and select chars, bytes, lines or files switches.

 

 

Split by number of Lines/Bytes/Chars/Files definition:

 

* Format: number1[,number2,...], means separate text by number1,number2,... of bytes/chars/lines/files.

 

* Example:

 

3 => split text by 3 bytes/chars/lines/files

 

3,4,5 => split text by 3,4,5,5,5,5,... bytes/chars/lines/files

 

3,4,-1 => split text by 3,4,(-1),4,(-1),4,(-1),... -1 means skip one line.

 

 

How to Set split naming rules:

 

 

User can select one of the rules in Split Naming list.

 

User can also edit the Split Naming window to make a customized rule.

 

 

The Meaning of elements in Rules:

 

 

Basic Rules:

 

${FILENAME} means the whole filename(entered in output filename field in replace dialog)

 

${BASE} means the filename without extension.

 

${EXT} means the extension, if file has no extesion, abc.${EXT} will equal to 'abc', not 'abc.'

 

${FIRSTLINE} means the using the firstline in the file as part or whole of the filename.

 

# means sequence No. occupying 1 character space.

 

## means sequence No. occupying 2 character spaces.

 

...

 

@ means sequence No. from 'a' to 'z'

 

@@ means sequence No. from 'aa' to 'zz'

 

@@@ and more means sequence No. from 'aaa' to 'zzz'

 

 

Advanced Rules:

 

${FILENAME}{n1,n2} means the character n1 to character n2 of the ${FILENAME}, if n1<0 or n2<0 means count from end.

 

${FILENAME}{function,para2,para3,... } will be translated to function(${FILENAME},para2,para3,...)

 

${FILENAME}{function,para2,para3,... }{n1,n2} is combination of above 2 rules

 

${FILENAME}<expression> means evaluate expression with ${FILENAME} as variable $match, for example ${FILENAME}<chars($match,1,3)> will be translated to chars(${FILENAME},1,3)

 

${FILENAME}<expression>{n1,n2} is combination of above rule and ${FILENAME}{n1,n2} rule.

 

##...#{num_start,num_step} means the sequence number start from num_start, increased by num_step.

 

##...#<expression> means evaluate expression with sequence number as variable $match.

 

 

Note 1: n1, n2, num_start and num_step can be any of the integer number.

 

Note 2: All rules about ${FILENAME} also apply to ${BASE} and ${EXT}

 

Note 3: All rules about ##...# also apply to @@...@

 

 

Example:

 

 

1) with rule "###_${BASE}.new", following file,

 

file.txt

 

 

will be splitted to following files,

 

 

001_file.new

 

002_file.new

 

003_file.new

 

...

 

 

2) with rule "###{1,2}_${BASE}{2,-2}.new", following file,

 

file.txt

 

 

will be splitted to following files,

 

 

001_il.new

 

003_il.new

 

005_il.new

 

...

 

 

3) with rule "###_${BASE}{replace,'f','m'}.new", following file,

 

file.txt

 

 

will be splitted to following files,

 

 

001_mile.new

 

002_mile.new

 

003_mile.new

 

...

 

 

Note 1: In following case, the filename can be different:

 

If the first line of a paragraph has format of: "FILENAME:myfile", then this paragraph will be written to the file "myfile", and the first line will not be written to the file. If "myfile" is a pure name without path, it will be written to the path of output_filename.

 

Note 2: this operation can be done manually in file menu or popup menu in edit windows.