Print List of Files in Windows Directory: 10 Ways
In this article
- 1. Command Prompt with Dir
- 2. PowerShell with Out-File
- 3. PowerShell to CSV for Excel
- 4. Tree Command for Folder Structure
- 5. Print from File Explorer (Manual)
- 6. Using the Print Directory Feature (Third-Party)
- 7. Command Prompt with Dir and Formatting
- 8. PowerShell with HTML Export
- 9. Using the Command Line with Robocopy
- 10. Batch File for One-Click Printing
- How to Choose
- Frequently Asked Questions
- Final Thoughts
Need a printed or PDF copy of the files in a Windows folder? Whether you're making an inventory, auditing a project, or simply keeping a paper backup, this guide covers 10 practical methods to generate and print a file list. You'll learn built-in command-line tools, PowerShell scripts, and third-party utilities—no advanced skills required.
1. Command Prompt with Dir
The classic dir command is the quickest way to get a plain-text list. Open Command Prompt, navigate to your folder with cd, then type dir > filelist.txt. This creates a text file with names, sizes, and dates, which you can open in Notepad and print.
For a cleaner list without extra info, use dir /b > filelist.txt. The /b flag outputs only file and folder names, one per line. To include subfolders, add /s—e.g., dir /b /s > filelist.txt.
2. PowerShell with Out-File
PowerShell offers more control and formatting. Open PowerShell in the folder (Shift+Right-Click → "Open PowerShell window here") and run Get-ChildItem | Out-File -FilePath list.txt. This exports file names to a UTF-8 text file.
To include full paths, use Get-ChildItem | Select-Object FullName | Out-File list.txt. For a table with size and date, try Get-ChildItem | Format-Table Name,Length,LastWriteTime | Out-File list.txt. You can then print the text file from any editor.
3. PowerShell to CSV for Excel
If you want to sort, filter, or print a professional-looking table, export to CSV. Run Get-ChildItem | Export-Csv -Path list.csv -NoTypeInformation. Open the CSV in Excel, adjust column widths, and print directly.
This method is ideal for inventories because it includes name, extension, size in bytes, and last modified date. You can also add -Recurse to include subfolders: Get-ChildItem -Recurse | Export-Csv list.csv.
4. Tree Command for Folder Structure
The tree command prints a visual tree of folders and files. In Command Prompt, type tree /f > tree.txt. The /f flag includes files, not just folders. The output uses box-drawing characters, which look great in a printed document.
This is perfect for showing a directory hierarchy at a glance. Note that it lists only names—no sizes or dates—so it's best for structure, not detailed inventory.
5. Print from File Explorer (Manual)
If you only need a short list, you can manually select files in File Explorer, copy them (Ctrl+C), and paste into Notepad or Word. The pasted text will include file names (and sometimes more, depending on the copy method).
This works for a handful of files but becomes tedious for hundreds. Also, the pasted format may vary—sometimes it's just names, sometimes it includes paths. It's a quick hack, not a robust solution.
6. Using the Print Directory Feature (Third-Party)
Windows doesn't have a built-in "Print Directory" button in File Explorer. To get that functionality, you can use free tools like Print Directory or Directory List & Print. These add a right-click context menu option to print a file list directly.
They offer customization—choose columns, include subfolders, sort by name or size, and even generate PDFs. While third-party, they're widely used and safe if downloaded from reputable sources.
7. Command Prompt with Dir and Formatting
For a more readable list, you can format the dir output with /w (wide) or /p (pause). But for printing, you'll want to redirect to a file. Use dir /a /s > full_list.txt to include hidden and system files.
To sort by size, use dir /os (smallest first) or dir /o-s (largest first). Combine with > file.txt to save. This gives you a sorted list without extra software.
8. PowerShell with HTML Export
If you want a nicely formatted HTML file that you can open in a browser and print, PowerShell can generate it. Run Get-ChildItem | ConvertTo-Html -Property Name,Length,LastWriteTime | Out-File list.html. Open the HTML file in any browser and use the print option.
You can also add CSS for better styling, but the default is clean enough. This method is great for sharing or archiving, as HTML files are universally viewable.
9. Using the Command Line with Robocopy
Robocopy is a powerful file-copy tool, but it can also log file lists. Use robocopy . The /L flag lists files without copying, and the logging options produce a clean output.
This is a bit advanced but useful for very large directories because Robocopy handles long paths and many files efficiently. The output includes full paths, which is handy for scripts.
10. Batch File for One-Click Printing
Create a batch file (.bat) that runs a command and then opens the output file. For example, save a text file with dir /b > list.txt & start notepad list.txt. Double-click it to generate and open the list instantly.
You can even add a line to print automatically using print list.txt, but that sends it to the default printer without a preview. This is a time-saver if you need to do this frequently.
How to Choose
The best method depends on your needs. For a quick, no-frills list, the dir command is unbeatable. If you need a formatted table with sizes and dates, PowerShell to CSV is the way. For a visual tree, use tree /f. If you want a right-click solution, third-party tools are most convenient.
Consider whether you need subfolders (/s or -Recurse), hidden files (/a), or a specific format (text, CSV, HTML). Also, think about how often you'll do this—a batch file or third-party tool pays off if it's a regular task.
Frequently Asked Questions
Q: Can I print a file list without any extra software?
A: Yes, use Command Prompt or PowerShell to redirect output to a text file, then print that file from Notepad or Word.
Q: How do I include subfolders in the list?
A: Add /s to dir (e.g., dir /b /s > list.txt) or use -Recurse in PowerShell (e.g., Get-ChildItem -Recurse).
Q: Why does my list show only file names but not sizes?
A: The /b flag in dir gives bare names only. Omit /b to see sizes and dates, or use PowerShell's Format-Table for a custom view.
Q: Can I print the list as a PDF?
A: Yes. Generate the list in a text file, then use the "Microsoft Print to PDF" printer when printing from Notepad or Word. Or export to HTML and print to PDF from your browser.
Q: Is there a way to get a list of files with full paths?
A: Use dir /s /b in Command Prompt or Get-ChildItem | Select-Object FullName in PowerShell.
Q: Are third-party tools safe?
A: Generally yes, if downloaded from official sites or reputable sources. Always scan with antivirus before running.
Final Thoughts
Printing a file list in Windows is easier than it seems once you know the right command or tool. Start with the built-in options—they're free and reliable. For frequent use, consider creating a batch file or installing a dedicated utility. With these 10 methods, you can handle any directory listing task.