Use Command Prompt in Windows 10 or 7 to Create a Text File List of Filenames from a Specific Folder

Hits: 977
3 1 1 1 1 1 1 1 1 1 1 Rating 3.00 (5 Votes)

There are times when you need to get a list of all the filenames that are in a particular folder.  You could type them all out one by one in a text file or excel spreadsheet.   However, when the folder is extremely large and has a lot of files in it, this can be a bit more cumbersome.  In this guide, I will show you how to use the Command Prompt to spit out a Text File which will contain a list of all the filenames contained in a specific folder. (Note: This Guide can actually be used in any version of Windows)

 

In order to start, you first need to know where your folder is located.  For this example, my folder is located in C:\Listing

CreateTextFileFromCMD 1

As you can see, I have a bunch of Photos in this folder and I want to print out a list of the filenames.

In order to do this

Click Start and in the Search Field Type cmd

CreateTextFileFromCMD 2

When it comes up, you need to type the following:

dir /s “C:\Listing” > “C:\Listing\Listing.txt”

CreateTextFileFromCMD 3

 

Hit Enter and it will just go to another line (and appear like it didn’t do anything – but it did)

 

CreateTextFileFromCMD 4

Now navigate to the location in Windows:

There it is:

 

CreateTextFileFromCMD 5

Now you can open it (or if you want to manipulate it some more, open it in Excel)

CreateTextFileFromCMD 6

Done!

Print