Forum Moderators: phranque

Message Too Old, No Replies

Global search and replace

How can it be done without opening every file in an editor?

         

MatthewHSE

1:23 am on Dec 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



From another thread: [webmasterworld.com]

Global search and replace rocks ;)

I would love to have such a capability. Is there a certain tool that will do that or something? Right now I can open all my pages in my text editor and do a search-and-replace on all open documents, but is there a tool that will replace text on all documents in a directory, without needing to open all the files? If so, where can I find it?

captainhannes

7:13 am on Dec 6, 2003 (gmt 0)

10+ Year Member



Which OS? ;-)

As for Win, we use HomeSite from Macromedia in the company. It has the capability of an "extended search & replace" over "all open files" or over the whole diectory including an recursive "include subfolders" option.

Cheers,
Hannes.

ergophobe

3:40 pm on Dec 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




See message #3 in this thread [webmasterworld.com] from a year or so ago. Links to a few good regex search and replace programs, free and otherwise.

Tom

WeirdoPL

3:21 am on Dec 7, 2003 (gmt 0)

10+ Year Member



I can write a very simplified version of global search&relpace in Pascal and send You the source code.

Staffa

9:46 am on Dec 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you are on Win get Stone's webwriter it does an extended search and replace in all the files in a directory without opening the files.
It's free and I've been using it for 3 years.

amznVibe

12:32 pm on Dec 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



TFM search and replace [tfm.ro] is free

this one [funduc.com] is shareware but powerful (regex support, etc)

danny

1:00 pm on Dec 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is a no-brainer one-liner using standard Unix tools.

perl -p -i -e 's/oldstring/newstring/g' $(find . -name \*.html)