Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

831.Text file parser -- How to extract and join text from multiple files with user defined format?

User: editor -- 2011-08-01          << 830  832 >>
Hits: 3783
Type: Text file parser   
Search all Text file parser examples
Description:
How to join text from multiple files with user defined format? Need to join multiple text files with user-defined format like: 
<find>filename1</find> 
<replace>file content1</replace> 
<find>filename2</find> 
<replace>file content2</replace> 
..
Input Sample:
file a1234.txt: 
tttt 
file b5678.txt 
hhhh 
...
Output Sample:
output file: 
<find>a1234</find> 
<replace>tttt</replace> 
<find>b5678</find> 
<replace>hhhh</replace>
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. open "Tools->Batch Runner" window 
2. drag multiple text files to "Batch Runner" window 
3. click "Fast Replace" button to open "Fast Replace" window 
click "Add" to add new rules: 
* set "search" to nothing, if only need first line of file content, enter: 
* set "replace" to: 
 
click "ok" 
4. check option of "Reg exp", "cross line" and "Extract", and click "Start" 
5. select "output to single file", and enter an output file like "rule.txt", done.

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to extract first line from multiple files and generate a new file? (70%)
How to convert a text file to specified format? (66%)
How to extract A1~A5 from txt file with following format? (65%)
How to join corresponding line of multiple text files with specified format? (65%)
How to search and replace in multiple files base on user-defined mapping file? (65%)
How to batch extract ascii text from multiple binary files, such as exe files? (65%)
How to extract last 100 lines from multiple files? (63%)
How to convert multiple text files to html files with self-defined format? (63%)

Check Demo of Text file parser
Keywords:
user defined  join multiple  define  user  fine  output to single file  rules  find  cross line  file content  search defined multiple files  join text to single line  extract first line from multiple files  extract first line multiple files  join multiple files  extract content  content extract  add first line multiple text files