Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

811.Text file parser -- How to extract and remove common lines from multiple files?

User: bruce lee -- 2011-06-30          << 810  812 >>
Hits: 421
Type: Text file parser   
Search all Text file parser examples
Description:
how to extract all the lines contained in file A,B,C and D?And delete the common content from A,B,C and D?
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Steps to extract common lines from multiple files:
1. ctrl-h open 'replace' dialog
* set 'replace with pattern' to:

* click 'advanced' tab, set 'run following for each matched unit' to:

2. click 'Batch...' button open 'batch runner'
3. drag multiple files A,B,C,D to batch runner window
4. change 'set output filename' to blank so no file will be written.
5. click 'batch replace', common lines will be extracted
6. ctrl-s save common line to common.txt

Steps to remove common line in multiple files:
7. ctrl-h open 'replace' dialog
* set 'replace unit' to 'Line'
* set 'If' to:

8. click 'Batch...' button, and drag multiple files to batch runner window, set output filename to ${FILENAME},
9. click 'Batch Replace'. 

Screenshot 1:  Extract common line, 'replace':


Screenshot 2:  Extract common line, 'advanced':


Screenshot 3:  Remove common line, 'replace':


Similar Examples:
How to extract all c++ comments from multiple cpp files? (74%)
How to extract the last non-blank line from multiple text files? (73%)
How to remove additional line breaks from multiple files? (72%)
How to extract all image links from multiple html files?  (72%)
How to extract specified lines in multiple excel(csv) files? (70%)
How to remove consecutive duplicate words in multiple files? (68%)
How to extract all lines that contain "abc" from multiple files? (65%)
How to remove a string of characters from multiple filenames? (65%)

Check Demo of Text file parser
Keywords:
remove common lines from multiple files  remove common lines  common lines from multiple files  written  keys  asp  common  grep  diction  dictionary  delete common lines files  how to extract common lines from multiple files  batch file delete blank lines multiple 2  how to extract common pattern  batch file remove common lines from  common lines multiple files  extract common lines in file  remove common lines from files