Search and Replace Failed
Search and replace fails to find the target text even though windows search shows many instances of the target text. Same response for the fnr utility. What is wrong?
without providing additional information I only can assume that you did something wrong as find function is working for me.
If you suspect that Notepad++'s Find feature is broken because it doesn’t work for you, please don’t post here and say “find is broken” without providing any details. Why are details needed when the Find feature is so obviously broken? [Clearly anyone should be able to see how busted this is without me wasting time providing details…] Well, it is very likely that it is YOU that is broken, and not Notepad++!
Here is something to try when you are sure that Notepad++'s Find is broken:
Set the Find window controls the following way, pay close attention now… :
Put your desired search text in the Find what zone.
Verify that your search text actually occurs in the currently active editor document tab (VERY IMPORTANT!)
Press the Find Next button in the Find window.
It is extremely likely that Notepad++ has found your text and jumped the current caret location to it, and even highlighted it with a selection! Amazing, isn’t it? In the rare event that Notepad++ did not find your text, then feel free to post here and provide details so others can attempt to reproduce the failure.
Otherwise, you now have to ask yourself, “Why was I so sure that Notepad++'s Find was busted?” Well, actually reading the text of the controls on the Find window might help. Let’s see…was I…
- …expecting to find text that only occurs below the current caret position, but yet I had the Backward direction checkbox checked, and the Wrap around checkbox unchecked?
- …expecting to find text that only occurs above the current caret position, but yet I had the Backward direction checkbox unchecked, and the Wrap around checkbox unchecked?
- …searching for “the” and expecting it to match “THE” and I had the Match case checkbox checked?
- …searching for “test” and expecting it to match “testing” or “stoutest” and I had the Match whole word only checkbox checked?
- …searching in Extended or Regular expression search mode without knowing what that really means?
Sorry, I never meant to imply the program failed, only that I must have done something wrong. I am a first time user trying to find and replace some sensitive language in many files on each of several personal computers in a DoD environment. Files include Word, PowerPoint and Excel. Using the Windows search box results in identifying these files OK, but of course, does not support find and replacing the text. Using Notepad++, I did the following:
Search, Find in files, “TextOld” in the “Find what” field, “TextNew” in the “Replace with” field, no filters, browse to the appropriate directory and insert in the “Directory” field, check in the “Match whole word only” box, no check in the “Match case” box, “Normal” search mode, no “Extended” button, No “Regular expression” button, check in “In all sub-folders”, no check in “Follow current doc.”, No check in “In hidden folders”, check in "Transparency_On losing focus (default?). Then click “Replace in Files”, and OK to replace all occurrences.
Report shows no occurrences found. ???
You are trying to replace text in WORD, EXCEL and POWERPOINT documents using Notepad++? That’s not going to work. The format of those files is not text!
never meant to imply the program failed
No worries. This has become somewhat of a FAQ: “Notepad++ Find doesn’t work, why?”–with no details. It gets kind of old. When it comes up again I’ll just link to my post above. :)
I could sift through your more detailed scenario and try to establish what is going wrong for you, but really @Jim-Dailey has it right–you shouldn’t be using Notepad++ on these files anyway.
I finally came to the same conclusion. MS Office must use different encoding than text for their file format. Sorry for the bother, but I still have the problem. Any suggestions would be appreciated. Thanks, all.
Thanks Claudia. This one looks very friendly. See also “Global Office Find and Replace” Powerful, but pricy.