Notepad++ find in files filter EXCLUDE

前端 未结 8 1355
时光取名叫无心
时光取名叫无心 2021-02-03 16:53

I\'m looking for a way to get n++\'s find in files dialog to exclude certain files...

the only reference I\'ve found so far is this http://sourceforge.net/project/showno

8条回答
  •  隐瞒了意图╮
    2021-02-03 17:10

    There may be a more elegant way, but you could use PowerShell to get all of the extensions in a folder, and then just remove the ones you don't want. This example gets all of the extensions in the "C:\Program Files\Internet Explorer" folder.

    NB: don't forget to surround (Get-ChildItem ... -join ";*" with parentheses.

    "*" + ((Get-ChildItem -File -recurse "C:\Users\SomeUser\Documents\Visual Studio 2013\Projects\WindowsService1" | Where {$_.Extension -ne ""}| Select-Object Extension -unique | Sort-Object Extension | Get-Unique -asString  | Select -ExpandProperty Extension | % { $_.ToLower() } | Get-Unique) -join ";*")
    

    This returns:

    *.cache;*.config;*.cs;*.csproj;*.exe;*.jmconfig;*.manifest;*.settings;*.sln;*.txt

    Then just remove what you don't want.

提交回复
热议问题