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
Replace text for all files in a tree ?
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
ozymandias
-
Andreas
Re: Replace text for all files in a tree ?
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.
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 ?
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...
<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...