• Login
Community
  • Login

Search for files by extension

Scheduled Pinned Locked Moved General Discussion
9 Posts 3 Posters 7.7k 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.
  • B
    B Marcin
    last edited by Feb 1, 2017, 5:44 PM

    I’m hoping this isn’t a dumb question. Is there a way to use Notepad++ to go through a directory and return a list of files by extension? For example, if I have 20k files in a directory with multiple file types, I would like to get a list of files for a specific extension that I can then edit for other purposes. I am not interested in the contents of the files. I know how to do this in unix and also by using dos commands but I was hoping to find a quick way to do this in Notepad++. My apologies if this has already been discussed before. Thank you.

    C 1 Reply Last reply Feb 1, 2017, 6:08 PM Reply Quote 0
    • C
      Claudia Frank @B Marcin
      last edited by Feb 1, 2017, 6:08 PM

      @B-Marcin

      not sure what you are looking for exactly, but what about File->Open and in file name put in *.YOUREXTENSION and press enter.

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • B
        B Marcin
        last edited by Feb 1, 2017, 8:35 PM

        Claudia, I don’t need to open any files. I want to be able to search for files within a directory that have a specific extension and then be able to copy the result set into my clipboard. Notepad++ can search through a set of files and return a result set showing the lines where a filter matches but I’m simply looking for a way to retrieve a list of filenames. Thanks.

        S 1 Reply Last reply Feb 1, 2017, 9:06 PM Reply Quote 0
        • S
          Scott Sumner @B Marcin
          last edited by Feb 1, 2017, 9:06 PM

          @B-Marcin

          A simplified way of doing this is something like the following in the Run menu’s Run… box:

          cmd /c dir/s/b $(CURRENT_DIRECTORY)\*.txt | clip

          Obviously the example uses files with a .txt extension…

          1 Reply Last reply Reply Quote 3
          • B
            B Marcin
            last edited by Feb 1, 2017, 9:26 PM

            Thanks, Scott. I can get the list like you say using DOS commands, however, I was hoping there was a way to do it in Notepad++. I used to work with Ultraedit which performed this sort of function easily but I no longer have a copy of it.

            S 1 Reply Last reply Feb 1, 2017, 9:29 PM Reply Quote 0
            • S
              Scott Sumner @B Marcin
              last edited by Feb 1, 2017, 9:29 PM

              @B-Marcin said:

              hoping there was a way to do it in Notepad++

              What wasn’t “in Notepad++” about my suggestion? ;-)

              1 Reply Last reply Reply Quote 2
              • B
                B Marcin
                last edited by Feb 1, 2017, 10:02 PM

                Got it. I thought you meant the Windows Run box. Thanks :)

                I still would have figured that this would be a basic one or two-step function in Notepad++ sans all the parameters, etc.

                S 1 Reply Last reply Feb 2, 2017, 3:42 AM Reply Quote 0
                • S
                  Scott Sumner @B Marcin
                  last edited by Feb 2, 2017, 3:42 AM

                  @B-Marcin

                  Well, if you leave it sitting in the Run menu, it sort of becomes a parameter-less thing… You can return to it easily later and change the extension to search for, for example.

                  This is the world of Notepad++, where workarounds thrive for things you will NEVER see made into simple clickable menu items. I, for one, like the aspects of N++ that allow such things to be possible. I tried UltraEdit (and others) for awhile before settling on N++; coming from another powerful editing environment that I used for 20 years, I’ve (so far) found that N++ is one of the few suitable for the needs of the true power user. :-D

                  1 Reply Last reply Reply Quote 1
                  • B
                    B Marcin
                    last edited by Feb 2, 2017, 1:42 PM

                    Scott - Yes, I see that now. Thanks for the help.

                    1 Reply Last reply Reply Quote 0
                    6 out of 9
                    • First post
                      6/9
                      Last post
                    The Community of users of the Notepad++ text editor.
                    Powered by NodeBB | Contributors