Find in files - find extensionless files
dada a last edited by dada a
I want to use find in files function.
and it yields no results.
Using as an example 2 files, one .txt and one extensionless, using * !*.txt replaces in the extensionless file while skipping the .txt, but when I try to replace the extension at the end with an * to reach all extensions, it finds nothing. Is there a way to achieve exclude all files with extensions?
dada a last edited by
Right now the only way I see is listing all the extensions that I don’t want, for example:
* !.txt !.pdf !*.mp3 … and so on
Neil Schipper last edited by
@dada-a I don’t have a solution to your exact problem, but here’s a pretty good workaround if you’re not dealing with a deeply nested directory tree:
- turn on a Project Panel (under View)
- add a project
- “Add Files…” and use Windows file open dialog to: sort by file type, select all files with no extension, Open
Now you can perform Find in Projects
PeterJones last edited by
@dada-a said in Find in files - find extensionless files:
Is there a way to achieve exclude all files with extensions?
What you want to exclude are all files that have at least one character after the extension. But
*.*matches zero-or-more characters after the extension, so
!*.*excludes all files, with or without extension.
If you want to guarantee that it excludes only files with at least one character after the extension, use
!*.?*, where the
?matches one character, and the
*after it matches zero or more characters in the extension.
So the full Filters setting of
!*.?*if you’re on Notepad++ v7.8.7 or later) will only match files that have no extension.