Page 1 of 1

dynamic find & replace

Posted: Mon Mar 28, 2005 10:00 pm
I have multiple .html files with this link in it:<myText>/present.html

I also have a text file with a list of names.

What I want to do is replace <myText> in each document, but I want it to increment through the list of names so that my files each have a different link when done.

So if my text file looked like:

george.htm would have the link:

while phill.htm would have:

and greg.htm would have:

please please help, I cant bear the thought of doing this manually over hundreds of files.

Posted: Tue Mar 29, 2005 8:42 am
by Abacre

I started to write the answer about using "Cyrlic Replace" but then I
found out that in this case you have to create the file with names

So we added new feature into the program that can do the job
automatically. It's called "Include File Name into search scope"

What should you do step by step:

Please download the latest version of the program:

This is only updated EXE file. You need to extract executable file from
zip archive into folder where the program is installed. So you will
replace old executable file by this new one.

Start the program.

Go to main menu - Action - Options - Batch Replace:
check ON: "Include File Name into search scope"
Press OK.

Go to Batch replace tab of the main window.
Check ON: "Use regular expressions".

Put into "Search for":

and into Replace with:

Press Execute button. The program will do the job.
Tell me does it work?

Note, always backup files before replacements.



We call it "Cyclic Replace From File"
Read more:

So what should you do:
Go to Replace tab, select "Cyclic Replace From File" action.
Set Search for:

Replace with:

(where c:\files\file.txt is correct path to your file name with the list of names).

Our questions:
In each file do you have only one occurrence of the link?<myText>/present.html