Batch Search and Replace

Ideas for new features

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

Post Reply
gkeeler
Posts: 7
Joined: Mon Aug 27, 2007 6:38 pm

Batch Search and Replace

Post by gkeeler »

I like to use a text file with one pair of search and replace criteria on each row with the pair separated by a comma or tab. Then run the search and replace through all files within a folder. Should be able to select files to process using wild cards and also specify writing the replaced files to a different folder. Dreaming!
gkeeler
Posts: 7
Joined: Mon Aug 27, 2007 6:38 pm

Most of the pieces needed already in TextPad

Post by gkeeler »

Most of the pieces already exist in the 'Find In Files' process:
- Seach folders ('In folder') and subfolders (search subfolders checkbox)
- regular expressions
- list of files and lines where the search item is found
(listed in Search Results)
- Replace All in All Documents
- Save All

The only part of the process that is missing from text pad is a loop that
puts all the 'Find In Files' options together:

Pre-loop:
import the search and replace criteria file
Loop start:
- parses the search and replace string in each row of the file
- inserts the search and replace strings into the Find In Files process one row at a time
- run the Find In Files search
- Open All
- 'Replace All' in 'All Documents'
- Save All
Loop end: Lather, Rinse, Repeat

A nice addition would be an option to save the results to another folder.

Here's a look at some software that does Batch Search and Replace (see the 3rd screenshot for the Batch Search and Replace setup screen).
http://www.digitalvolcano.co.uk/tcscreenshots.html

[/u]
Post Reply