Sometimes we need to generate a list of all the documents in one folder, and sometimes that folder contains too many files to count. This article will show you how to create a list of a folder's contents in Explorer.
In this article: Listing All Files | Bonus: Listing Specific File Types
Listing All Files
To begin, we have set up a folder in Windows Explorer called Test Folder with three files in it: debug.log, placeholder.docx, and tester.png.
In an empty section of the folder (try beneath the last file) hold down SHIFT and the right-click to open a secondary menu. Select Open Command Window Here or Open PowerShell Window Here. This will open up a new window.
Next we are going to list all files and folders contained within Test Folder by typing in DIR and pressing Enter. The list contains the file's name, size, and modified date/time. Following this step isn't crucial to creating a list, but it will show you what files are in the directory.
We can then generate a list of these documents in basic text format, and place that text into a document that lives in the same folder as the one we need the list for (Test Folder). To do this, type dir > listmyfolder.txt and press Enter.
By doing this you are gathering the list in the directory (dir) and asking the system to put that list into a text document (.txt) named "listmyfolder" (listmyfolder). Essentially you can name this file whatever you want (example: dir > WhateverYouWant.txt).
You may now exit the Shell Window by typing Exit and pressing Enter, or closing it using the X in the top righthand side of the window.
You will now see a new file in the folder called listmyfolder.txt.
By opening this folder, you will now have a list of the files in that folder in text format. This can now by copied and pasted as you please, be it a Microsoft Word document, a spreadsheet, or any other program that accepts copy/paste functionality.
Bonus: Listing Specific File Types
Say you have a folder with hundreds of files in it, and you only want to list the picture files with the extension ".jpg". Here's how to get that list.
Follow the steps above to open the Shell Window, and type dir *.jpg > AllTheJPGs.txt. Press Enter.
What this does is asks the system to take from the directory (dir) a list of all files (the * is a wildcard that means "anything") ending with .jpg (.jpg), and then place it into a text document (.txt) called "AllTheJPGs" (AllTheJPGs). The document is then saved to the folder you were originally inspecting. You may now exit the Shell window by typing Exit, or pressing the X button in the top righthand corner of the window.
You can use this formula to generate a list of any file type. If you want Optical Disk Image files, use dir *.iso > FileName.txt. If you want Photoshop files, use dir *.psd > FileName.txt. You get the idea!
Comments