top of page
Writer's pictureJared Reid

How To: List All Items in a Folder in Explorer

Updated: Oct 30, 2023

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.



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.

shift Right Click in Explorer's Folder

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.

List of files in Shell

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.

List My Folder dot t-x-t is in the folder.

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!


2 views0 comments

Related Posts

See All

Comments


bottom of page