0

I am using Windows 7 "ultimate" and I have a folder with approximately 24 text files. I have a list of words which I need to be searched for, and then each word must be replaced with a new word from another list I have. I need to perform the find-and-replace on all of these text files, for all the pairs of words to be found-and-replaced.

For example: In all the files, find "mortgage" and replace it with "mortg".

In all the files, find "Average" and replace it with "avg".

In all the files, find "housing" and replace it with "hsng".

In all the files, find "Percent" and replace it with "pct".

In all the files, find "Private" and replace it with "priv".

In all the files, find "science" and replace it with "sci".

etc. etc.

I have my list of words which need to be found-and-replaced in a simple 2-column Excel spreadsheet (column A: find, column B: replace with).

I hope someone can help me with a suggestion. I thought I might be able to do this with a macro in Visual Basic but unfortunately I don't have VB installed on my computer.

  • 1
    You might find [this PowerShell script](http://stackoverflow.com/a/2837891/425738) from another answer to be useful. – ldav1s May 14 '14 at 20:58
  • Could this answer help? rather than VB you could use VBA, which is included with MS Office and you mentioned you have excel http://stackoverflow.com/questions/10434335/text-file-in-vba-open-find-replace-saveas-close-file – Kerridge0 May 14 '14 at 21:16

0 Answers0