Page 1 of 1

Replace one by one

Posted: Tue Sep 25, 2012 10:11 am
by ErwinT
First of all: Thank you for making such a FAN-TAS-TIC program. It has saved me hours and hours. It has cost me hours and hours as well though, finding out about regular expressions and such. It can become quite addictive ;-)

Anyway, I have a question/feature request.

In a replace operation, at times I would like to have the option that the program asks me for confirmation for each found text piece separately. Especially if one file contains instances you want to replace and instances you do NOT want to replace.

Kind of like the replace text in Word, it jumps to the next instance and asks "replace/skip and go to next?"

It might well be that TC can do this already, I just have not found how to yet.

Re: Replace one by one

Posted: Tue Sep 25, 2012 8:40 pm
by Fool4UAnyway
You may just use a text editor for this. The replace feature usually supports one-at-a-time replacements with confirmation or from a separate button. Look at Notepad++, for instance.

You could also walk through the list of matching files and look at the shown matches and then (de)select (only) those files that you (not) want to replace in. Of course, this works for whole files only, and not for specific instances within files.

Re: Replace one by one

Posted: Tue Sep 25, 2012 10:13 pm
by ErwinT
Sure I could use a text editor, but that's not the point of having a dedicated find-and-replace tool now is it ;-)

I would like to have the option of finding and replacing text instances in multiple files, one by one. This should include regular expressions.

If there are in a directory with 1000 files approximately 10 files with only a few text instances of which some must be replaced and others not, it would be less work to confirm them one by one than to refine the regular expression until only the wanted text is found (and then unrefine it again to check if really all instances you wanted to replace are gone now).

I find it a pity having to leave TC for another F&R tool for these kind of searches. You have to fill in the path again, the search text again, then the new tool has to search in all those 1000 files again, etc...

Just add a check box next to the "in marked files" check box, that says something like "confirm each replace". When unchecked it is business as usual. When checked, you have to confirm each replace manually. This of course only has effect on the replace button. The search button still lists the whole shebang in one window.