2

I'm trying to replace something in all .js files that have a folder called Views somewhere in their pathname. This includes these samples:

  • C:\Project1\Web\Views\Entity\List.js
  • D:\Project2\Views\AnotherFolder\YetAnotherFolder\Go.js

Is that possible in Notepad++?

Can voidtools Everything be used with Notepad++? I mean to search in a given list of files that can be found using voidtools Everything?

1 Answers1

3

Welcome to Super User!

While this cannot be done with Notepad++ itself, you can combine it with voidtools Everything application.

First, close all tabs in Notepad++

In Everything, enable options "Menu → Search → Match Path" and "Menu → Search → Enable Regex".

And type that in search bar:

\\views\\.*\.js$

Review all files and make sure it's what you want, since this action cannot be undone!

Now select all files with Ctrl+A, and drag them into Notepad++ window.

Then open search-and-replace dialog (Ctrl+H), go to "Replace" tab, carefully set the replacement options and hit "Replace in all open documents".

Now review your changes in files, save all files with "Menu → Save All" (Ctrl+Shift+S) and close all tabs with "Menu → Close All" (Ctrl+Shift+W)

Sanya_Zol
  • 403