How to List Files in a Directory

You have decided to start cataloging the files on your PC, creating a list of movies, songs, photos and games that you have saved on your hard drive, but you shudder at the thought of having to open all the folders and transcribe them one by one in a text document file names they contain? I would love to know who put such an idea in your head! There are far better ways to do this, and I can tell you in detail if you want.

In the guide you are about to read, in fact, you can find a detailed explanation on how to list files in a directory. I already anticipate that you can be able to do this job both by using some "standard" functions available on and macOS that by installing some third-party applications that are suitable for the purpose.

So, what are you doing still standing there? Come on: make yourself comfortable, take all the time you need to concentrate on reading this guide and you will see that, by following my "tips" step by step, you will be able to list the files in your computer folders without the slightest difficulty . I wish you happy reading!

How to List Files in a Directory on Windows

If you want to know how to list files in a directory on windows, know that you can do this by either using PowerShell and Command Prompt, two tools integrated "standard" in the famous Microsoft OS, which using third party software. Find everything explained below.


As I told you a moment ago, come on Windows is you can list the files of a folder with PowerShell, a utility that can be recalled quite simply after opening the folder whose files you want to list. To use it, go to the location where the folder in question is located by opening theFile Explorer / Windows Explorer (The gialla poster located on the taskbar), by pressing the key Shift on the keyboard and at the same time right clicking on the icon folder say your interest.

From the menu that opens, then, select the item Apri PowerShell qui. In the PowerShell window that appears on the screen, give the command dir > ElencoFile.txt replacing FileList the name you want to give the list and give Submit on the keyboard. This will create a file containing the list of all files saved in the directory under consideration. Easier than that?

Command Prompt

On versions of Windows prior to 7, PowerShell is not included “as standard”. It can be downloaded separately but, to list the files present in a directory, it is more convenient to turn to another tool included by default in the system: the Command Prompt which works similar to PowerShell.

To use it, type the command "cmd" in search bar Windows, right-click on the first occurrence that is found, select the item Run as administrator from the context menu and then presses the button Yes.

At this point, indicate the location where the folder is located (eg. C:, D:, etc.), write the folder name using formatting cd [folder name] and give the command dir > ElencoFile.txt taking care to replace a FileList the name you want to assign to the list containing the files in the directory of your interest.

To finish, press the button Submit on the keyboard and, by doing so, you will get a file containing the list of all the elements present in the directory under consideration.

Simple File Lister

Simple File Lister is a free program for Windows that, in a few clicks, allows you to create detailed lists of all the files in a specific folder. Just indicate the folder to be cataloged and, within a few seconds, create a text file with the complete list of the files contained in it (of any type they are).

To list files with Simple File Lister, the first step you need to take is to connect to its website and first press on the item placed at the bottom of the page and then on the first link [email protected] on the right. When the download is complete, open the file you just downloaded (SFLSetup.exe) and, in the window that opens, click on the button first Yes and then Next.

Accept, therefore, the conditions of use of the program by placing the check mark next to the item I accept the agreement, pig sul sul bottone Next three consecutive times and then on the buttons install e Finish. After installing Simple File Lister, to start it, you have to click on the link that is created in the menu Start.

If you have difficulty starting the program, perhaps because a warning appears about its compatibility with the operating system in use, you can solve the problem as follows: open theFile Explorer / Windows Explorer, go to the folder C:UserstuonomeAppDataLocalSimpleFileLister, right click on the icon SimpleFileLister and select the item Property give the menu check if you press.

In the window that is shown to you, after selecting the tab Compatibility, check the box Run the program in compatible mode for and choose one of the versions of Windows older than the one you have (Windows 7 should be fine). Finally, remember to save the changes by pressing the buttons ApplyOK.

Also, if you want to list the contents in a system directory, remember to start the program as administrator: to do this, right-click on its icon and select the item Run as administrator from the hand that opens.

Once you have started Simple File Lister, click on the button Agree and select the folder whose contents you want to list by clicking on the folder which is next to the wording Target. Select, therefore, the folder and the destination format of the list of files you want to generate (eg. TXT o CSV) by first clicking on the other icon of the folder placed next to the item output e pulsing sul pulsating Play.

If you want to customize the content of the list to be generated, remember to click on the item template located at the bottom right, in the main Simple File Lister window, remove the check mark from the box Simple list and place it on the items corresponding to the other items you want to include in the list. Finally, press the button OK to save the changes made.

How to List Files in a Directory on MacOS

If you own a Poppy, you can list the files in a folder by issuing simple commands from terminal, or by resorting to third-party applications. The choice is yours!


If you don't intend to resort to third-party solutions, you can generate file lists of the folders on your Poppy using the terminal, an application present "standard" on MacOS which allows you to perform various operations by issuing commands on a command line interface.

To proceed, you must first launch the terminal: open the Launchpad by clicking on the rocket located on the bar Dock, open the folder Other and click the program icon. At this point, drag the folder you want to generate a list of in the Terminal window, so as to paste its path, give the command ls> elencofile.rtf replacing a file list the name you want to give to the document containing the list of files in the directory and then press Submit on the keyboard.

By doing so, a file in RTF containing the list of all the elements in the directory that you have "fed" to the Terminal: you can find it in the folder Start of your Mac. Easier than that ?!

Print Window

If you want to resort to some third party solution, instead, you can list the files of a folder on Mac using Print Window, an application that allows you to export the contents of the Finder folders in a rather simple and fast way. I point out that it is free, although there is a paid version (starts at 18,13 euros) that offers advanced functions.

First, download Print Window by connecting to its download page and pressing the button Download at the top right. Once the download is complete, open the package .dmg you got, press the button Agree, drag Print Window to the folder Applications macOS and, after opening the latter, right-click on the program icon and select the item apri twice in a row (this is necessary only on its first start, to "bypass" the restrictions imposed by Apple on software from non-certified developers).

Then, on the button Ok in response to the welcome window that appears, click on the button Select Folder… located at the bottom right of the main application window and select the folder you are interested in (alternatively, drag it to the Print Window).

At this point, set the characteristics of the list that will be generated. Then choose the layout, the information to include in the output file (File Information) and specify if you want the icon and header (Icons & Headers). If you want, you can also use presets from the menus Format e Style located at the top right.

Finally, press on the buttons PrintPrint to print the list of files in the directory of your interest or open the menu PDF located on the left (after pressing the button Print) and select the saving options you prefer (if you don't want to print the document in question).