Print or Export Windows Folder Contents Free

Last Updated on October 18, 2026

If you are like most people, you have created many files and folders on your computer, and sometimes it can get a little tough trying to manage all these files and folders. There may even be a time when you want to print or export the folder contents from your computer. Even though Windows doesn’t have a built in tool to do this, it’s still possible to accomplish this without using a 3rd party app to do so.

In this article, we will be showing you several commands you can use to print or export folder contents in Windows so you can choose the method that works the best for you.

How to Export a List of Files in a Folder to Text or Excel (No Apps Needed)

The image below shows the Documents folder that we want to print out or export to a file. As you can see, there are many files as well as several folders.

File Explorer Documents folder
Folder contents we want to print

Exporting Folder Contents Using Command Prompt

1. Open the Command Prompt

The first step in the process involves opening a command prompt and then browsing to the folder that you want to print or export the folder contents of. You must navigate directly to the target directory using standard DOS commands. If you want to add a right click open admin command prompt context menu item to Windows, check out this video.

Command Prompt
Browse to the folder location

2. Run the Directory Export Command

Now that we are in the Documents folder, we will run the first command which will export the directory contents to a text file. You can then save or print out this generated list. Type dir > List.txt into the console window. You can change the name List to anything you like but be sure to leave the .txt extension so you can open it with Notepad.

Command prompt create list
Directory output to text file command

3. Verify the Text File Creation

After you run the command, you will not receive any confirmation that it was successful from the command prompt. It will just go back to the same prompt as where you started. You will then see your text file in the same directory you printed. You can then double click it to open it or even print it directly.

File Explorer documents folder
Exported directory contents text file

4. Review the Exported Data

You will see that any items that are folders will have <DIR> in front of them. It will also list the date, time and file size in the exported file. At the very top of the text file, you will see the exact path to the directory you have exported the folder contents for.

How to Print or Export Folder Contents in Windows without Using a 3rd Party App
Exported directory contents sample file

Advanced Directory Export Methods

1. Export Full File Paths

If you would rather have a listing of the file and folder names that shows their entire path, you can use a slightly different command string. Type dir /a /s /b > List2.txt into your prompt and hit enter. This will just list the file names, but you will be able to see exactly what folder they are in as well.

2. Understand the Command Switches

Here are what the switches in the command will do for the results. The /a switch displays all files, including hidden and system files. The /s switch searches all subdirectories, listing files and folders recursively. The /b switch uses bare format, displaying only file and folder names without extra details like size or date.

Exported Folder Contents
dir /a /s /b output command

3. Create a Hierarchical Tree View

The next command we will use is the tree command to get a completely different view of our files and folders. The tree command displays the directory structure in a highly visual hierarchical tree format. Type tree >List3.txt to generate this specific layout. As you can see from the results, it shows each folder along with its subfolders underneath them perfectly.

Print or Export Folder Contents
tree command output

Exporting Folder Contents Using File Explorer

1. Copy the File Paths

For our last method to print or export folder contents in Windows, we will be using the Copy as path feature of File Explorer. To do this, simply select all or however many files and folders you want to print or export. You can press Ctrl-A on your keyboard to select all the files and subfolders in the directory. Then you can right click on any of the files and choose Copy as path.

Copy as path right click
Right click Copy as path context menu

2. Paste the Copied Data

Then you can open Notepad, WordPad, Word or any other text editor you wish to use and paste it into it. Press Ctrl-V to dump the clipboard contents onto the blank page. As you can see in the image below, the folder content list was formatted based on the exact order of the files in File Explorer with the List 1, 2 & 3 text files sitting right on top.

Exported folder list
Paste Copy as path output into Notepad

3. Sort and Recopy Your Files

We will now sort the files and folders by name and repeat the entire process. Click the name column header in File Explorer to reorganize the items alphabetically. Select them all again and copy the paths directly to your clipboard.

File Explorer file list
Sorting files and folders

4. Review the Sorted Output

Paste the newly copied data into a fresh text document. As you can see, the results match the order of the files and folders when we paste it into Notepad once again. This method gives you total control over the final list presentation. Check out this third party tool that will let you export a directory listing  with clickable links.

Text file with exported list
New output results

For additional training resources, check out our online IT training courses.

Check out our extensive IT book series.

Cindy Thomas

Cindy Thomas is a coder and web designer with 8years of experience in the computer industry.

Related Posts

© 2026 Online Computer Tips
Website by Anvil Zephyr