User: editor -- 2009-08-28 << 349 351 >> |
Hits: 5073 |
Type: Replace text in multiple files |
Search all Replace text in multiple files examples |
Description: |
How to batch change format of multiple files? |
Input Sample: |
source file format: site s1 x =0; y !y1_actinoli 0.7231 z =1/2; occ NA+1 0.04 beq 0.970 occ CA+2 0.88 beq 0.970 occ MN+2 0.08 beq 0.970 site s2 x =0; y !y2_actinoli 0.9113 z =1/2; occ MG+2 0.39 beq 0.580 occ FE+2 0.61 beq 0.580 site s3 x =0; y !y3_actinoli 0.8214 z =0; occ MG+2 0.34 beq 0.550 |
Output Sample: |
Target file format: site NA x =0; y !y1_actinoli 0.7231 z =1/2; occ NA+1 0.04 beq 0.970 occ CA+2 0.88 beq 0.970 occ MN+2 0.08 beq 0.970 site MG x =0; y !y2_actinoli 0.9113 z =1/2; occ MG+2 0.39 beq 0.580 occ FE+2 0.61 beq 0.580 site MG x =0; y !y3_actinoli 0.8214 z =0; occ MG+2 0.34 beq 0.550 |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
Summary of the question: the "site sXX" and "occ YY" are in the same line, replace "site sXX" with "site YY" 1. open "Tools->Batch Runner" window 2. click "Pick Files" to pick multiple files 3. If you want rename file at the same time, check "set output filename" option, and change ${FILENAME} to the format you need. 4. Click "Fast Replace" button, open "Fast Replace" dialog * Click "Add" * Enter "Search=>" to be * Enter "Replace=>" to be * Click "OK" * Make sure "Regular Exp" option is checked, then Click "Start", done! Note: to avoid unexpected data loss, please make backup before any change operation. |
Screenshot 1: Fast_Replace_Window |