How can I see the "Replaced files" after search and replace?
-
I made a simple search and replace. Said that “3 occurrences were replaced”, as you can see. Ok, but how can I see exactly those replaced files (their filenames) ?
-
The simple answer is “you can’t”.
The more complex answer is that if you had done a Find in Files first, you could use the results from that find to look at the rough areas where the Replace in Files had done its work.
Another (complex) way is to save off all of the files that could be affected by a replacement to another location. Then, after the replace, use a directory(+file) compare utility to examine what changed.
Be very careful with Replace in Files (that’s why it has a popup confirmation box).
-
yes, but the option “Find in files” works only on a search, and yes it show me the result on “File result” debbugger. But not on the “Replace in files”. It should also show me the result (and filenames) on the replace I made, just as on a search.
-
I don’t really understand your response.
If you need that information, just to the Find in Files before the Replace in Files, like I had said. You can be sure that whatever was found in the first will be replaced in the second.
Or maybe I’m missing something about what you’re saying. -
To be more specific, please compare this 2 print screens. First one shows me the result of the search (and the filename), the second one doesn’t show me the result of the files which I replaced (neither the filename).
-
As one example of why this cannot work this way, consider if your Replace with contains nothing, i.e., you are using a replacement to totally delete the matching text.
In this case, there would be nothing to show.
-
so, for short, in the second case, notepad++ tell me the message: “Replace in Files 1 occurrence was replaced.”
It would have been nice to show me the name of the file that was changed, just like “Find All”. It is very important to check exactly the filenames, to be sure I didn’t miss something.
Please consider this for future improvements of notepad++.
-
@Robin-Cruise said in How can I see the "Replaced files" after search and replace?:
Please consider this for future improvements of notepad++.
You seem to be under the misunderstanding that this Forum is where the developers hang out and look for feature requests. Most of the regulars here are just fellow users of Notepad++, and cannot influence whether or not new features are added or bugs are fixed. The “Feature Request…” FAQ entry explains where to really go to make a true feature request that will be seen and tracked by the developers.
It would have been nice to show me the name of the file that was changed, just like “Find All”
Or, like @Alan-Kilborn has already told you twice, you can run Find All first (to give you the list of the found instances) followed by the Replace in Files which will actually do the replacement on those same matches.
-
@PeterJones said in How can I see the "Replaced files" after search and replace?:
Or, like @Alan-Kilborn has already told you twice, you can run Find All first (to give you the list of the found instances) followed by the Replace in Files which will actually do the replacement on those same matches.
yes, but if I have 1000 files, and I want to check only 50 of them, it would take me longer to do both.
-
So what @PeterJones says is all true.
But, before you @Robin-Cruise , think “I’m going to go make a feature request for this now!” consider that when regulars such as @PeterJones and myself comment on what you are asking for, and kind of tell you it is a request that doesn’t make a great deal of sense, AND show you workarounds, don’t be at all surprised if your feature request gets ignored at best and declined at worst. Sorry, that’s kind of the reality of it.
-
And, of course, the above advice was totally ignored. :-)
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9275