Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1379.Text file parser -- How to pick up lines containing specified suffix from many files in a folder?

User: gxiang -- 2016-09-24          << 1378  1380 >>
Hits: 993
Type: Text file parser   
Search all Text file parser examples
Description:
I hope to pick up lines containing suffix from many files.
Input Sample:
input file:

suffix list file a.txt

tion
ure
ity


bank files in d: est
1.txt
nation   n. definition
nature   n. definition
national   a. definition
international   a. definition

2. txt
It is a new nation.
I love nature.
It is a national issue.
....
Output Sample:
output file:

tion

nation   n. definition
It is a new nation.


ure

nature   n. definition
I love nature.

ity
...
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Assume the working folder is d:\test\

1. ctrl-o open suffix file a.txt
2. ctrl-h open 'replace' dialogue
* set 'replace unit' to 'Line'
* set 'search for pattern' to:

* set 'replace with pattern' to:


click 'advanced' tab:
* set 'run following for each matched unit' to:
 
3. click 'replace', done.
4. ctrl-s save to file.

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to extract lines containg specified words from many files? (73%)
How to remove lines containing specified words in a text file? (66%)
How to pick up paired lines with specified rules in a text files? (63%)
How to extract all lines containing words in specified file? (63%)
How to copy a line containing specified word and insert between line 1 and 2? (62%)
How to findout all lines that contain specified words in multiple files? (62%)
How to extract all lines that contain specific words in a file? (60%)
How to extract random lines containing specified words? (59%)

Check Demo of Text file parser
Keywords:
grep  lines containing  fix  lines contain  dir  containing  test  pick  content  ass  txt file parser  many txt  txt txt test  test txt  search folder  test test test test  replace folder  replace many files