replace multiple different texts in different text files

Status
Not open for further replies.

techdaemon

Banned
Banned
663
2010
5
0
Is there a batch script or a windows program which can be used to replace multiple different texts inside different text files with different replacement texts at once using regex/wildcards?

Here's the scenario:

I have hundreds of text files with texts inside them such as E:\documents\fruits\Apple.jpg, E:\documents\instruments\Guitar.png, etc. along other lines of texts within the files.

I would like to replace these texts with different ones which I put inside one text file which contains the replacing texts one text per line. This text file's contents looks something like:

Code:
E:\documents\121345643\Guitar.png
E:\documents\347627548\Apple.jpg

Take note that the directory names in between "E:\documents\" and the filenames vary and the filenames are the ones constant.

I have Windowsgrep installed but I'm not sure whether it can be used to do this task. I have used it before for simple find and replace tasks in which I needed to replace similar texts within files with one "replace with" value.

Any kind of help would be appreciated.
 
13 comments
or to make it more simple i am looking for an application that will allow me to batch find and replace different texts in multiple text files

For example:

Ball --> Basketball
Love --> Loved
Apple --> Pineapple
Pillow --> Throw-pillow

The texts to the left are the original texts found in multiple text files and the ones next to the arrows are the replacement texts which I would just like to type in or paste from clipboard
 
@masterbator

grepwin only allows searching one term in multiple files at one instance. i need something that will allow me to search multiple terms/texts in multiple text files and replace these terms/texts with multiple values I will define--all at once! as in batch!
 
The command is munge. It came with the resource kit for windows prior to 2000.
ind and Replace text within file(s)
Munge.exe has been dropped from the Resource Kit in Windows 2000 and above.
Syntax
MUNGE ScriptFile [options] FilesToMunge...
Each line in the ScriptFile should take one of the following 3 forms:

oldName newName
"oldString" "newString"
-F .Ext Name. Name.Ext

MUNGE myChanges.ini -v
http://hotfile.com/dl/97989813/8694125/munge.zip.html
 
I found this app called Useful File Utilities. It has a batch renamer plugin. Really handy. :)
Thanks everyone for your replies. Appreciated it.
 
Status
Not open for further replies.
Back
Top