Replace text for all files in a tree ?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Jean-Pierre Dumas

Replace text for all files in a tree ?

Post by Jean-Pierre Dumas »

How can I do a search and replace (litteral or regexp) for all files
(That can mean a lot) in a disk or directory tree.
(c.f. NoteTab Pro)

TIA

Jean-Pierre
ozymandias

Re: Replace text for all files in a tree ?

Post by ozymandias »

wingrep www.hurricanesoft.com.

You can even link wingrep to textpad to make it the default editor.
Andreas

Re: Replace text for all files in a tree ?

Post by Andreas »

In Textpad:
Close all files if any are open.
If the Search Result window is open, go to it, right click and select "Clear all"
Find / Find in Files
Put your search string/pattern in there and set all the options as necessary (e.g. subfolders).
Do the search.
All files containing the pattern will be in the search result list
Right-click in the list, select "Open all"
Now go to search/Replace, put in the boxes whatever you want to replace.
Make sure "All Documents" is selected in the "Scope" box.
After "Replace All", you can save all the files by using File / Save all.
Andreas

Re: Replace text for all files in a tree ?

Post by Andreas »

Jean Pierre wrote in a mail to me:
<cite>
Whao!

Just have to do a macro ...

I did not think it was possible that way.
A bit heavy may be, but if it works...

Thank you.

jp
</cite>

Just a warning: Find in Files is not available in Macros...
Post Reply