| User: editor -- 2013-07-04 << 1094 1096 >> |
| Hits: 3831 |
| Type: Text generator |
| Search all Text generator examples |
| Description: |
| I have a text file (mytxt.txt) containing sometext, I also have a list of 100 words in list.txt: cat,dog,bat,pig,... zebra For each word I wish to create a text file e.g. cat.txt, which is a copy of mytxt.txt where VAR1 is replace with cat. |
| Input Sample: |
| File mytxt.txt: ... VAR1 ........ VAR1 ... VAR1...... ....... File list.txt: cat dog bat pig ... |
| Output Sample: |
| File cat.txt: ... cat ........ cat ... cat...... ....... File dog.txt ... dog ........ dog ... dog...... ....... ... |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
| 0. Put your file list.txt and mytxt.txt under folder d:\test\ 1. ctrl-o open list.txt 2. ctrl-h open 'replace' dialogue * set 'replace unit' to 'Line' * click 'advanced' tab * set 'run following for each matched unit' to: 3. click 'replace', then check folder d:\test\ you will get all files like cat.txt, dog.txt, ... |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |