• Login
Community
  • Login

Find in files - find extensionless files

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 3 Posters 981 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    dada a
    last edited by dada a Mar 9, 2022, 10:42 AM Mar 9, 2022, 10:40 AM

    I want to use find in files function.
    I’m using:
    * !*.*
    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?

    P 1 Reply Last reply Mar 9, 2022, 2:01 PM Reply Quote 0
    • D
      dada a
      last edited by Mar 9, 2022, 10:48 AM

      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

      N 1 Reply Last reply Mar 9, 2022, 12:25 PM Reply Quote 0
      • N
        Neil Schipper @dada a
        last edited by Mar 9, 2022, 12:25 PM

        @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

        1 Reply Last reply Reply Quote 2
        • P
          PeterJones @dada a
          last edited by Mar 9, 2022, 2:01 PM

          @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 *.* !*.?* (or !*.?* if you’re on Notepad++ v7.8.7 or later) will only match files that have no extension.

          • https://npp-user-manual.org/docs/searching/#find-in-files-tab
          1 Reply Last reply Reply Quote 4
          3 out of 4
          • First post
            3/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors