Pinterest Stumbleupon Whatsapp

find-and-replace-textI have been using Notepad ++ for years as my Windows Notepad replacement.

It does highlighting and line numbers, these were my first reasons for using it. Notepad ++ has been my best friend for writing scripts and HTML files.

Now I had a new challenge and my buddy Mike told me that Notepad ++ would be my easiest and FREE solution.

Here was my dilemma – I had 8,342 HTML files and I needed to replace some text on every single page to reflect a company’s identity tweaking. The company was mostly adult-oriented before and now they are trying their hand at mainstream. They needed to remove the word ADULT from their company name every where throughout their site. Now your friendly neighborhood admin was not going to be doing this manually – that was for sure. So I fired up Notepad ++ and searched for this magic option.

Sure enough there it was on the search menu – the option that was going to make my life easier – “Find In Files”.

Using this awesome feature I am able to have Notepad++ find all files with the word I choose in them. It then shows me the results of my search. Once I click on all the instances I want to change, it will open those files. I can then do my “replace on all open files”.


find and replace tool

find and replace files

After you find all your instances and have all the files open in Notepad ++ you can then click over to the replace tab – now you will see a option to replace throughout ALL OPENED FILES! Sweet!

I am guessing that some of you out there have never heard of or used Notepad ++ before. So let me run down the basic features with you. If you are a scripter, coder or any type of programing monkey this program will make you salivate!

Check it out, Notepad ++ has:

  • Syntax Highlighting and Syntax Folding
  • User Defined Syntax Highlighting
  • Auto-completion
  • Regular Expression Search/Replace supported
  • Full Drag “˜N’ Drop supported
  • Multi-Language environment supported
  • Brace and Indent guideline Highlighting
  • Macro recording and playback
  • Bookmarks

Do you have another way to find and replace throughout a slew of files? After completing this task I was told about another free application that might have made my life even easier… It is called BkReplaceEm and stay tuned for my review!

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Meakai
    February 14, 2016 at 7:45 pm

    I was trying to open 5000+ with notepad++, then I went searching and found this. The new version of notepad++ allows you to choose the directory to "find and replace".

    Thank you x5000

  2. Maz Bron
    October 2, 2015 at 12:35 pm

    Thanks a lot mate, i Notepad++ new version can replace word in all file directly without opened :D
    once again thanks :D

    • Maz Bron
      October 2, 2015 at 12:35 pm

      Thanks a lot mate, in Notepad++ new version can replace word in all file directly without opened :D
      once again thanks :D

  3. ernesto mateo
    August 28, 2015 at 9:01 pm

    Thanks man. You save my life.

  4. Kamaal Mohamed
    July 13, 2015 at 5:22 am

    Thank you so much for the tutorial.

  5. Luis
    April 13, 2015 at 12:57 pm

    A long time ago, some smart folks thought about this problem (and other similar problems) and asked themselves the question: would it be better to have a lot of commands and tools for each type of task, or would it be better to have just a tiny set of tools that do just a couple of things each, and can be organized in a sequence, in different ways, so that you can solve lots of different problems? (kind of like lego pieces). They decided the little tools was a better idea. This was so good, that even after 40 years of advances in computing no one has come with anything better. If you learn those tools, you will be able to solve a large number of things, almost like magic. To do it: download Cygwin, and install/learn sed and awk (very simple to do) and learn about pipes ( | )

  6. Amanda Sellers
    January 28, 2015 at 7:34 pm

    I just ran across this when I was looking for a way to batch edit text files. We use a program that creates them, but they need to be modified before they can be sent to our shop. This worked perfectly for what I need to do and I already had Notepad++ on my PC. It's also going to help some co-workers save some time as well. Thank you!

  7. kenny , scotland
    December 16, 2014 at 10:43 am

    Actually Dreamweaver does this with a large site of html files. but it wouldnt work with pure text files when i tried it.

    Well they were really .ahk files for auto hot keys.

    Been using Dreamweaver for years to manage 1500+ html files and it is just great at find / replace over entire current local site....

    Going to try the notepad + option for my text files ....

    I have some changes needed in about 60 text files, and was looking for an easy option.

    Thats how I found this old entry.... but someone might find it useful..

  8. Ashley Thomas
    June 26, 2009 at 11:23 pm

    OhMyGod I Love You!
    I was so stressed out because I got a new website, and I had to change all my links,
    but this program did it in like 10 seconds!
    Thank you so much!

  9. Andy
    February 27, 2009 at 2:27 pm

    To open many documents for the bulk find replace functionality use File > Open. Then when the file manager window comes up, highlight all the documents you want to edit. Once that is done, then you can follow Karl's steps above.

  10. spuri
    October 28, 2008 at 9:40 am

    I think this won’t work with UTF-8 file encoding… :(
    Do you know a newer clone?

  11. spuri
    October 27, 2008 at 9:41 am

    Do you know a free solution to make multiple replace in multiple files?
    I mean replace worldA with worldB and exA to exB in multiple files.

  12. Chris Hall
    October 24, 2008 at 2:10 pm

    Certainly, having to have all the 8000+ files open to work is not an ideal solution. HTML editors like Dreamweaver or CoffeeCup HTML Editor have had features like this for a while to make mass changes to files in a certain directory.

  13. Abhigyan Agrawal
    October 24, 2008 at 11:46 am

    While notepad++ is good for somethings, it is not the best solution for such a problem.

    A simple python script would do the trick much easily and neatly.

    import fileinput, glob, string, sys, os
    from os.path import join

    text_search = 'what ever you want to search'
    text_replace = 'what ever you want to replace with'

    path = join ('directory to search',"*")
    files = glob.glob(path)

    for line in fileinput.input(files,inplace=1):
    lineno = 0
    lineno = string.find(line, stext)
    if lineno > 0:
    line =line.replace(stext, rtext)


    You can of course change this so that it takes search text etc. as command line input.

  14. Miguel Guhlin
    October 24, 2008 at 2:39 pm

    Thanks to, I've discovered many new text editors. Here's my illustrated walkthrough of BK Replace Em, which worked well for my purposes.

    With appreciation,
    Miguel Guhlin
    Around the Corner

  15. Miguel Guhlin
    October 24, 2008 at 2:37 pm

    Howdy! Thanks to, I now have several programs to get the job done. In the meantime, here is my illustrated experience with BK ReplaceEm! It worked for me, so thanks to!

    Best wishes,

    Miguel Guhlin
    Around the

  16. fung
    October 23, 2008 at 7:03 am

    textCrawler will do the job better.

  17. Ted Murphy
    October 22, 2008 at 2:50 pm

    Notepad++ sounds like a nice free alternative. I use the shareware app Textpad all the time, which may be comparable. DrUskov's Notetab sounds excellent as well; I may give that a try.

    When I am coding html, however, and dealing with an actual website, I use HomeSite 4.5.2. I've used it for years, and I just keep installing the app along with license key over and over. Its now an Adobe product, and the price is a pretty steep $99 for the latest 5.5 version.

    If I were starting from scratch, I would probably pony up and buy a new version of Homesite. I'd kick and scream a bit first. This seems to be the case with all of Adobe's products -- expensive, but they work.

  18. DrUskov
    October 21, 2008 at 11:36 am

    I've never used Notepad++, but for my money Notetab ( is the best best. It's a heavy-duty text editor that I've used for 8 or 9 years, and I'm not sure why more people haven't heard of it. It is probably the most useful program I use. Period. Better than Excel even. And I love Excel.

    It replaces MS Notepad if you want, or stands alone. Clips (their term for macros) are insanely useful. I use them all the time. In fact, I just ran across the problem of wanting to make chanes to 1,400 HTML files I downloaded. Not only could I search/replace with regular expressions through all 1,400 files, I could open all 1,400 files individually or dump them all into a single document (and if I so desired remove all HTML coding, or just keep the URLs). MS Word would have a coronary if I tried that, but Notetab is scorching fast. I think I've had up to 800,000 lines of text in a document before without any apparent slowdown.

    Maybe the single most useful feature, and worth the download alone, is the ability to turn a text document into an infinite paste board. Press Ctrl+Shift+P for any single tab and it vacuums up any text you copy (no pasting needed). You can even define what you want Notetab to insert at the end of the pasted text (line break, paragraph, tab, asterisks, whatever). Great for superfast "scraping" of text from websites, particularly when you combine with Firefox's Autocopy Add-On. Sweet.

    Notetab comes in 3 flavors. I started with the free downloadable version, but forked over the $35 bucks to the get the Pro version (gives you multiple undo's, and a ton of other stuff). I've literally used it to make thousands of dollars because of the functionality it provides that I simply can not replicate in Word, Excel, or anywhere else as near as I can tell. And I'm always looking for other options, but can't find anything better.

  19. Aibek
    October 21, 2008 at 10:46 am

    I wonder how did you manage to open 8K files at the same time :-)

    • Karl L. Gechlik
      October 21, 2008 at 12:25 pm


      But wait I did just find a AMAZING alternative that does not require you to open all the files you want to search/replace through. It is called BK ReplaceEm 2.0 and at 413kb it can't be beat! I just finished my article on it and it will be up for everyone to read tomorrow!

  20. bcnubes
    October 21, 2008 at 12:56 pm

    I have never used it but it looks like Portable HTML batch was designed to do the same type thing.

    Portable HTML batch edit-
    A unique tool specifically designed to help webmasters, developers and any others to batch convert or operate on multiple files at the same time. It is specifically designed to operate on HTML files but you can use it on any type of files including binary ones.

  21. ontguy
    October 20, 2008 at 10:18 pm

    PSpad has a similar feature:

  22. Miguel Guhlin
    October 20, 2008 at 9:34 pm

    Howdy! NotePad++ looks like a great editor, but you didn't point out HOW to open all files found in the search. I'm trying your step by step to no avail...this is where more how to is needed:

    >Once I click on all the instances I want to change, it will open those files. I can then do my >“replace on all open files”.

    If you have 7000+ files, you have click on everything? I tried that and no luck.

    Thanks in advance,

    Warm regards,
    Miguel Guhlin

    • Karl L. Gechlik
      October 21, 2008 at 12:26 pm

      Sadly opening the files is manual but stay tuned for a review of another free utility called BK ReplaceEm 2.0 that will do it automagically.

  23. GeekLad
    October 20, 2008 at 8:06 pm

    As a programming "hobbyist" (I don't consider myself to be good enough to call myself a programmer), I really love Notepad++. My three favorite features are syntax highlighting, macros, and regular expressions in search/replace. The macro functionality is stupid easy to use and using regular expressions for search/replace can be really handy. Syntax highlighting makes it easier to keep code formatted properly and ensuring blocks of code are properly terminated.