Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

816.Replace text in multiple files -- How to insert 100 different lines into the beginning of 100 text files?

User: editor -- 2011-07-06          << 815  817 >>
Hits: 457
Type: Replace text in multiple files   
Search all Replace text in multiple files examples
Description:
How to insert 100 different lines into the beginning of 100 text files?
Input Sample:
line1
line2
line3
...
line100
Output Sample:
---------------------
File1:
line1
original lines ...
---------------------
File2:
line2
original lines ...
---------------------
...

---------------------
File100:
line100
original lines ...
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Assume the 100 different lines are saved in a text file: d:\test\lines.txt
1. open "Tools->Batch Runner" menu
2. drag multiple files from "windows file browser" to "Batch Runner" window
3. click "Fast Replace" button
* click "Add" to add a rue
* set "Search" to:

* set "Replace" to:

where lines.txt is filename, d:\test\ is the path
* click "ok"
4. make sure "Reg exp" and "Cross Line" options are selected, and click "Start"
5. click "Yes" to make the replace, done.

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to insert a text file into the beginning of multiple text files? (76%)
How to join every n lines into 1 line in a text file? (68%)
How to batch insert the filename into the beginning of the file conent? (66%)
How to move the last line to the beginning for multiple text files? (63%)
How to insert a blank line after every 5 lines in a text file? (60%)
How to sort the numbers in each line by the descending order in a text file? (59%)
How to count and sort the occurrence of different numbers in a text file? (58%)
How to parse all the fields in different segment from a text file? (57%)

Check Demo of Replace text in multiple files
Keywords:
100 different lines  path  test  cross line  100  insert  beginning  sum  fast replace  begin  add text into beginning of multiple lines  add text lines beginning  insert text into multiple files  insert text into multiple text files  add filename to beginning of  insert filename  insert text multiple files  insert text multiple file