Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

616.Text file parser -- How to delete from FILE A all lines that appear in file B?

User: editor -- 2010-09-20          << 615  617 >>
Hits: 2490
Type: Text file parser   
Search all Text file parser examples
Description:
How to delete from FILE A all lines that appear in file B?
Input Sample:
FILE A: 
line1 
line2 
line3 
line4 
FILE B: 
line2 
line4 
line6
Output Sample:
FILE A: 
line1 
line3
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Assume file B is in c:\test folder 
1. ctrl-o open file A 
2. ctrl-h open replace window: 
* set 'replace unit' to 'Line' 
* set 'if' to: 
 
 
select 'advanced' tab 
* set 'run following at the beginning of replace' to: 
 
3. click 'Replace', done! 
4. ctrl-s save A.txt 

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to delete all lines appear in file B from file A? (78%)
How to delete/remove all lines that appearred more than once? (67%)
How to delete all the lines without ceramics in text file? (66%)
How to delete lines that start with duplicate text? (64%)
How to remove all the lines appeared in file B,C,D from file A? (64%)
How to list all specific terms that appearing in a text file? (63%)
How to find all lines in file A that contain words in file B? (62%)
How to delete all lines whose first word appeared in previous line? (62%)

Check Demo of Text file parser
Keywords:
toc  values  clear  test  at the beginning  beginning  how to delete  delete  delet  dele  delete tab  delete following  delete all lines  delete lines  delete 3 lines  delete all  replace lines  replace from file