User: editor -- 2013-07-01 << 1090 1092 >> |
Hits: 3581 |
Type: Advanced search and replace |
Search all Advanced search and replace examples |
Description: |
There are many text files, how to insert filename into the begining of every line in each file? |
Input Sample: |
file1.txt: line1 line2 line3 file2.txt: line1 line2 line3 ... |
Output Sample: |
file1.txt: file1.txt line1 file1.txt line2 file1.txt line3 file2.txt: file2.txt line1 file2.txt line2 file2.txt line3 .... |
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 text files from windows file browser to "batch runner" window 3. click "Fast Replace" button 4. click "add" to add new rule: * set "search" to: * set "replace" to: or (no extension) * click "ok" 5. check option of "reg exp", UNcheck option of "cross line" 6. click "start", done. |
Screenshot 1: Fast_Replace_Window |