Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1024.Replace text in multiple files -- How to insert mulitple text files into multiple html files?

User: editor -- 2012-11-14          << 1023  1025 >>
Hits: 2034
Type: Replace text in multiple files   
Search all Replace text in multiple files examples
Description:
How to insert mulitple text files into multiple html files?

There are multiple html files 1.html, 2.html, ... 1000.html in folder A
There are mulitple txt files 1.txt, 2.txt, ...1000.txt in folder B

How to insert content of N.txt into N.html before the position of </html> tag? where N is 1,2,... 1000?
Input Sample:
A\1.html
A\2.html
...
A\1000.html

B\1.txt
B\2.txt
...
B\1000.txt
Output Sample:
Insert 1.txt into 1.html before the position of </html> tag
Insert 2.txt into 2.html before the position of </html> tag
...
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. open "Tools->Batch Runner" menu
2. drag multiple 1.html, 2.html, ...1000.html files from folder A to "Batch Runner" window
3. click "Fast Replace" button
4. click "add" to add new rules:
* set "search" to: 

* set "replace" to:

* click "ok"
5. make sure "reg exp" and "cross line" option are checked.
6. click "start", done.

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to extract all text enclosed by H1 tag from multiple html files? (70%)
How to split a text file into multiple files evenly on size? (70%)
How to replace text files using multiple pre-defined rules? (67%)
How to split a 100 line text file into 100 text files? (67%)
How to combine multiple pairs of text files line by line? (65%)
How to split a text file into multiple files and take the date as filename? (65%)
How to split a text file into multiple files with maximum 100k bytes? (65%)
How to convert multiple text files to html files with self-defined format? (65%)

Check Demo of Replace text in multiple files
Keywords:
dirname  position  html tag  tag  rules  before  bef  befor  dir  cross line  insert line into multiple files html  before new line  add before new line  add content before  insert html  replace position  insert text into multiple files  insert text into multiple text files