Scripts – Import A List of Search/Replace Strings
To import use a list of strings as search/replace pairs in a script:
1. Create your list of search/replace string “pairs” in a text editor. Each string should be on a separate line, separated by a DOS carriage return. The pairs should be balanced such that there should be a replace string (or a blank line) corresponding to each search string. One check on your file is that the number of lines should be an even number. For convenience later on, consider naming the file with the extension .srs.
2. Open the Script Editor.
3. Click on “Load”.
4. Navigate to the file you created in Step 1. The dialog defaults to the file name extension .srs. If you used another extension in Step 1, either manually type in the complete path to the file or change the initial file name filed to *.* (or another wild card) before navigating paths.
5. Click on “Open” after you have located the file..
6. The strings will be inserted into the Script dialog.
7. After reviewing the entries, click on “Use Script”.
8. In the Search and Replace main screen, enter a mask and path and perform your operation.
Example: The file “words.txt” consists of: |
|
Windows 31 |
|
When this is imported into the Script editor, the search/replace pairs would be: |
|
Search: Windows 31 |
Replace: Windows 95 |
Example: The file “words.txt” consists of: |
|
oil seal drive gear |
|
When this is imported into the Script editor, the search/replace pairs would be: |
|
Search: oil seal |
Replace: joint l’étanchéité à l’huile |