|User: michale -- 2010-02-27 << 433 435 >>|
|Type: Replace text in multiple files|
|Search all Replace text in multiple files examples|
|How to replace one content of same files with different contents ? |
For example. I have 4 txt files, they contains the same word "trust ", right now, I want to replace the 4 files, the results are"trust me", "trust jack", "trust mike", "trust you"
|I trust. |
I have 4 files above
|The results are: |
I trust me
I trust jack
I trust mike
I trust you
|Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.|
|Assume you need replace file1.txt, file2.txt, file3.txt, file4.txt, .... |
1. First of all, prepare a text file(such as a.txt) that contains your new strings in each line:
2. Load a.txt into system
(1). ctrl-o open a.txt
(2). ctrl-h open 'replace' window
* set 'Replace Unit' to 'Line'
* click 'Advaned' tab
set 'Run following at the beginning of replace' to:
set 'Run following for each matched' unit to:
* click 'Replace', the new strings will be imported into system.
3. Replace all files
(1) ctrl-h open 'Replace' window
* in 'Search for pattern', enter the string to find:
* in 'Replace with pattern', enter following:
(2)click 'Batch...' open 'Batch Runner' window.
* drag all files(file1.txt, file2.txt, ...) from file browser to 'Batch Runner' window, make sure they have right order.
* click 'Batch Replace' button, done
Screenshot 1: Replace_Window
Screenshot 2: Replace_Advanced_Window