User: editor -- 2011-10-13 << 871 873 >> |
Hits: 4806 |
Type: Character encoding |
Search all Character encoding examples |
Description: |
How to search and replace strings in multiple utf-8 encoded text files? There are multiple utf8 encoded text files, how to batch search the string 'old' and replace with 'new' in these files all at once? |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. Select menu "settings->encoding->utf8" to set the file encoding type to utf8 2. Open "Tools->Batch Runner" menu 3. Drag all files from windows file browser to "Batch Runner" window. 4. click "Fast Replace" button * click "add" to add a new rule: * set "search" to * set "replace" to * click ok 5. click "start" and all "old" will be replaced with "new" in all utf-8 files. * Note1 : by select different encoding type in step 1, you can also replace files encoded with other types, such as unicode(UTF-16). * Note2 : if there are many files, and only a few contain the string, you can use following procedure in place of step 3: Click "Search Files" button: * enter correct filename filter such as *.txt * select "search directory" * check option of "Containing Word/Phrase", and enter the search content such as "old" * check option of "search subdirectory", if you need to search subdirectory/subfolder. * click "search" button, and click "close" upon finish |
Screenshot 1: Fast_Replace_Window |