Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How can I see the "Replaced files" after search and replace?

    Help wanted · · · – – – · · ·
    3
    11
    66
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Robin Cruise
      Robin Cruise last edited by

      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) ?

      alt text

      Alan Kilborn 1 Reply Last reply Reply Quote 0
      • Alan Kilborn
        Alan Kilborn @Robin Cruise last edited by

        @Robin-Cruise

        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).

        1 Reply Last reply Reply Quote 1
        • Robin Cruise
          Robin Cruise last edited by Robin Cruise

          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.

          Alan Kilborn 1 Reply Last reply Reply Quote 0
          • Alan Kilborn
            Alan Kilborn @Robin Cruise last edited by Alan Kilborn

            @Robin-Cruise

            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.

            1 Reply Last reply Reply Quote 1
            • Robin Cruise
              Robin Cruise last edited by Robin Cruise

              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).

              alt text


              alt text

              Alan Kilborn 1 Reply Last reply Reply Quote 0
              • Alan Kilborn
                Alan Kilborn @Robin Cruise last edited by

                @Robin-Cruise

                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.

                1 Reply Last reply Reply Quote 0
                • Robin Cruise
                  Robin Cruise last edited by Robin Cruise

                  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++.

                  PeterJones 1 Reply Last reply Reply Quote 0
                  • PeterJones
                    PeterJones @Robin Cruise last edited by

                    @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.

                    Alan Kilborn 1 Reply Last reply Reply Quote 0
                    • Robin Cruise
                      Robin Cruise last edited by

                      @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.

                      1 Reply Last reply Reply Quote 0
                      • Alan Kilborn
                        Alan Kilborn @PeterJones last edited by Alan Kilborn

                        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.

                        Alan Kilborn 1 Reply Last reply Reply Quote 1
                        • Alan Kilborn
                          Alan Kilborn @Alan Kilborn last edited by

                          And, of course, the above advice was totally ignored. :-)

                          https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9275

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Copyright © 2014 NodeBB Forums | Contributors