Community
    • Login

    Search for files by extension

    Scheduled Pinned Locked Moved General Discussion
    9 Posts 3 Posters 8.9k Views 3 Watching
    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 MarcinB Offline
      B Marcin
      last edited by

      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.

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC Offline
        Claudia Frank @B Marcin
        last edited by

        @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 MarcinB Offline
          B Marcin
          last edited by

          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.

          Scott SumnerS 1 Reply Last reply Reply Quote 0
          • Scott SumnerS Offline
            Scott Sumner @B Marcin
            last edited by

            @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 MarcinB Offline
              B Marcin
              last edited by

              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.

              Scott SumnerS 1 Reply Last reply Reply Quote 0
              • Scott SumnerS Offline
                Scott Sumner @B Marcin
                last edited by

                @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 MarcinB Offline
                  B Marcin
                  last edited by

                  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.

                  Scott SumnerS 1 Reply Last reply Reply Quote 0
                  • Scott SumnerS Offline
                    Scott Sumner @B Marcin
                    last edited by

                    @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 MarcinB Offline
                      B Marcin
                      last edited by

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

                      1 Reply Last reply Reply Quote 0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      • First post
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors