Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

382.Text file splitter -- How to split the dictionary file and use word as filename?

User: editor -- 2010-01-04          << 381  383 >>
Hits: 466
Type: Text file splitter   
Search all Text file splitter examples
Description:
I have a dictionary text file, each line has one word and its definitions. How can I to split the dictionary file into many files, each one has the word as filename and definition as content.
Input Sample:
apple: the usually round, red or yellow, edible fruit of a small tree
pear: the edible fruit, typically rounded but elongated and growing smaller toward the stem
Output Sample:
=== file apple.txt===
apple: the usually round, red or yellow, edible fruit of a small tree
=== file pear.txt===
pear: the edible fruit, typically rounded but elongated and growing smaller toward the stem
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open the source dictionary text file
2. select menu "File->SaveAs->Split by bytes/lines"
* fill split naming as: ${FIRSTLINE}{words,1,1,'_'}.txt
* set split file by 1 line.
* click 'Next"
3. enter a result filename like b.txt in destination folder.

Dictionary file will be splitted to many files, each file contain only one line, the filename is the first word of the line, and the content is the line of the word.

Similar Examples:
How to split a file into many files by chapters, and use Chapter names as filenames? (65%)
How to split a text file into multiple files and take the date as filename? (62%)
How to split a text file according to first word in each line? (61%)
How to sort a file list by the extension of the filename? (57%)
How to split a CSV file with Header according to value of a column? (55%)
How to split a text file into multiple files evenly on size? (55%)
How to rename all the files by adding the file size after filename? (55%)
How to split many merged avi files into original avi files? (55%)

Check Demo of Text file splitter
Keywords:
split the dictionary  firstline  split naming  file into many files  dictionary  naming  diction  dic  text file splitter  splitter  split dictionary files  use word dictionary file  split a dictionary file  split dictionary file  word splitter open source  split one line into many  text file splitter use first line as filename  text file splitter split by first