Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Find in files - find extensionless files

    Help wanted · · · – – – · · ·
    3
    4
    177
    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.
    • dada a
      dada a last edited by dada a

      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?

      PeterJones 1 Reply Last reply Reply Quote 0
      • dada a
        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 1 Reply Last reply Reply Quote 0
        • Neil Schipper
          Neil Schipper @dada a 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

          1 Reply Last reply Reply Quote 2
          • PeterJones
            PeterJones @dada a 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 *.* !*.?* (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
            • First post
              Last post
            Copyright © 2014 NodeBB Forums | Contributors