User: park -- 2011-08-02 << 831 833 >> |
Hits: 3932 |
Type: Replace text in multiple files |
Search all Replace text in multiple files examples |
Description: |
how to add one column which is the filename in multiple txt files? |
Input Sample: |
filename:sz000001.txt Input Sample: 1991/12/23,1.56,1.56,1.55,1.56,127000, 3530600.000 1991/12/24,1.56,1.61,1.53,1.60,105000, 3050250.000 1991/12/25,1.60,1.63,1.60,1.61,226900, 6648170.000 1991/12/26,1.61,1.61,1.57,1.57,191800, 5370400.000 |
Output Sample: |
filename:sz000001.txt sz000001,1991/12/23,1.56,1.56,1.55,1.5 6,127000,3530600.000 sz000001,1991/12/24,1.56,1.61,1.53,1.6 0,105000,3050250.000 sz000001,1991/12/25,1.60,1.63,1.60,1.6 1,226900,6648170.000 |
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 csv/txt files from windows to "Batch Runner" window 3. click "Fast Replace" button to open "Fast Replace" window 4. click "Add" to add a rule * set "search" to: * set "replace" to: click ok. 5. make sure "Reg exp" option is "checked", and "Cross Line" option is "unchecked" 6. click "Start", done. |
Screenshot 1: Fast_Replace_Window |