How to exclude folders in Notepad++ search

In Notepad++, one of my features that I use a lot is “Find in Files”. If you ever use this feature, I’m sure you will agree that it’s a very powerful search (and replace) feature.

The problem is that Notepad++ search feature cannot exclude folders.

In WordPress plugin/theme project I often need to use Grunt or Gulp or Composer and it generate folders such as “node_modules”. And it’s usually very large in size with tons of library and codes.

I usually move them to other directory before I search, but I found a very simple trick to exclude it.

It’s very easy. Simply set that folder to “hidden”, and notepad++ will not search it, unless we check the “In hidden folders” option.

Set folder/directory to hidden

Just right-click and select “Properties”. And then change the attributes to “Hidden”.

You don’t need to apply changes to subfolders and files. Just the root folder.

Do not search hidden in hidden folders.

Make sure you don’t check the “In hidden folders” option in Notepad++ “Find in Files”.

And that’s it 🙂 Simple and easy way to exclude directory in notepad++ search.

Leave a Reply

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