Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

963.Replace text in multiple files -- How to put each line of keywords into multiple files with random occurrence?

User: jia -- 2012-06-23          << 962  964 >>
Hits: 3440
Type: Replace text in multiple files   
Search all Replace text in multiple files examples
Description:
I have a few articles, these articles are text files, and I have a keyword list. I want get the keyword insert to the articles orderly, the keyword in the article are randomly appear 4-6 times, and choose the keyword as the article title.
Input Sample:
keyword:                     
one 
two 
three 
 
 
1.txt 
 
blah blah  
 
blah blah 
 
blah blah 
 
blah blah 
 
2.txt 
blah blah  
 
blah blah 
 
blah blah 
 
blah blah
Output Sample:
1.txt 
 
one 
 
one blah blah  
 
one blah blah 
 
one blah blah 
 
one blah blah 
 
2.txt 
 
two 
 
two blah blah  
 
two blah blah 
 
two blah blah 
 
two blah blah
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. First of all, prepare the keywords.txt under folder d:\test\ 
2. ctrl-h open 'replace' dialogue 
* set 'replace with pattern' to: 
 
* click 'advanced' tab, set 'run following for each matched unit' entry to: 
 
3. click "Batch..." button to open "Batch Runner" window 
4. drag multiple article files to "Batch Runner" window, and make sure they are in correct order. 
5. click "Batch Replace", done!

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to read each line of a file and insert into multiple files? (63%)
How to distribute 6 numbers into multiple lines randomly? (62%)
How to split a text file into multiple files and take the date as filename? (59%)
How to insert random lines from one file into another file at random points?
(58%)
How to repeat each line multiple times with number increased/decreased? (58%)
How to split a text file into multiple files with maximum 100k bytes? (58%)
How to split a text file into multiple files evenly on size? (58%)
How to count the number of lines and characters in multiple files and make a list? (58%)

Check Demo of Replace text in multiple files
Keywords:
keywords  the keyword  keyword  randomly  times  key  pare  correct  random  rando  random insert title  random keyword insert  insert keyword  insert title  replace text with list random  insert randomly  make random  multiple occurrence