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: 293
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 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 convert multiple text files to html files with self-defined format? (63%)
How to create a text file including filenames in a folder with specified format? (61%)
How to extract and remove common lines from multiple files? (61%)
How to replace file content in multiple files with corresponding filename? (61%)

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