Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

991.Text merge -- How to merge all files, and split into specified number of files evenly?

User: Aaron -- 2012-08-14          << 990  992 >>
Hits: 1835
Type: Text merge   
Search all Text merge examples
Merge multiple smaller files into larger output files with a specific size. Script should allow setting of output file size.
Input Sample:
A folder with 100 text files. Size of each file is 10-20k.
Output Sample:
Example output: Merge these 100 files into 50 with an average size of 40k.
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. open "Tools->Batch runner" menu
2. drag multiple files from "windows file manager" into "Batch Runner" window.
3. click "File Merge" button, and select targe file, such as all.txt
4. close "batch runner" window, ctrl-o open all.txt
5. select menu "File->Save As->Split by line/chars/bytes"
6. set split file by: "50 Files"
7. click "Next", and select a target filename such as d:\test\a.txt, the file will be splited to d:\test\a.001.txt, a.002.txt, ... a.050.txt

Similar Examples:
How to re-arrange lines with in a specified number of lines? (69%)
How to rename all files by multiplying each number in filename by 3? (64%)
How to keep specified number of lines randomly? (63%)
How to find out all lines that appeared specified number of times? (60%)
How to move all files to specified sub-folders according to their extension? (59%)
How to extract all lines that contain specific words in a file? (58%)
How to shuffle all elements in a specified range in text file? (58%)
How to remove all folders in a list containg folders and files? (58%)

Check Demo of Text merge
a001  splite  smaller  file size  size  even  merge multiple  specific  text merge  merge  merge into larger files  merge smaller files into larger  merge files into specific size  filename specific  split a file into multiple files windows  split a file evenly into multiple  split the file into multiple files by size  merge file with filename