Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1095.Text generator -- How to create files from template where filenames and keywords come from a list?

User: editor -- 2013-07-04          << 1094  1096 >>
Hits: 3525
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


Similar Examples:
How to generate files from template file, where some variables come from a list? (71%)
How to batch rename files by a filename mapping list? (59%)
How to batch rename files by generating a random word that in the list? (58%)
How to batch rename files by multiplying each number in filename by 2? (56%)
How to create a serial files from a template file with "_TAG_" replaced by different strings? (56%)
How to rename files to the first and last line of file contents? (55%)
How to batch rename last part of filenames to the strings from a file? (55%)
How to rename all files by multiplying each number in filename by 3? (55%)

Check Demo of Text generator
Keywords:
dog  create files from template  keywords  keyword  create files  create a text  filenames  var  create  key  filenames to text generator  100 words generator  words generator 100  file copy generator  words to replace is generator  list of filenames  create list of files in folder  replace and create files from list