Last Updated on December 26, 2022 by Mathew Diekhake
Do you have a folder or directory in Windows that you want to print the contents of? There are many reasons why people want these printed. You won’t get what’s inside each file printed; you will get the file name printed. You might have heaps of songs in a folder or important documents that you want to store in a list, preferably in order.
About the only obvious thing to do without a proper guide would be to hold the print Screen key + Ctrl + C and take a screenshot of what you see on the screen. The problem with that idea is you can’t see the full contents of the folder on the display if your folder contains a number of items. Here’s a way you can save a complete list running Windows 10, Windows 8.1, Windows 8, and Windows 7 operating systems.
The following tutorial demonstrates how you print the contents of a folder or directory when you’re running on Windows 10, Windows 8.1, Windows 7 and Windows 7.
How to Print File Names in a Folder in Windows 10, 8.1, 8, and Windows 7
1. Navigate to Windows Explorer or File Explorer (depending on your Windows version).
2. Locate and open the folder you want to print the list for.
3. You should now have the contents of that folder on your computer’s display. It doesn’t matter if you cannot see all the list at this point.
4. Move the mouse to an empty white space within that folder, hold down Shift on the keyboard and right-click the mouse. You should get a new menu popping up on the display.
5. One of the options from the menu is Open new command windows here. Click that option and open the command line.
Those who do not use Windows all that much on the technical side might not be used to using the command line. While it looks like something from the 80’s, it is still the place where techie’s execute many commands.
6. Type the command: dir > List.txt and press Enter on the keyboard.
7. Now look inside the folder for a new file that has just been created. This is called a text file (.txt).
8. Open the text file to view the full list of files you have within the folder.
9. Those of you wanting to print can do so by turning on the printer and choosing print from the toolbar on the computer. Do that by navigating to File > Print.
Alternatively, you can navigate to File > Save As > Give the text file a name and save it so you can keep the list on the computer.
That’s all.
In conclusion, that is all you need to know how to print the contents of a directory or a folder when your computer is running on a version of the Windows 10, Windows 8 or Windows 7 operating system. The guide should work for all versions up until the time of writing this article. If you are running a newer version of Windows 10 such as the Anniversary update, then Microsoft might have changed how it is done.
This article was last updated on May 5, 2019.
Related Tutorials
Rodrocket
August 5, 2019 @ 16:33
Thank you for this solution. I go back to Windows 3.1 when you felt you had some control if you had some understanding of dos. I still have a 98 machine and I still like it better. I went from 7 to 10 on the last day because I knew the change was inevitable.
I finally found the “open power shell” line but when I entered your Dir list.txt command it didn’t like it and suggested that I enter “.\list.txt” and that worked fine. I was able to print the file. They seem to try to pack in so much crap into each release that you neither want not need and forget some of the things that are very useful.
Thanks again for your help.
stephanie
June 19, 2019 @ 19:00
oh, wow – this does really work! Happy, happy . . . I have passed this along to another person and she was quite excited. Thank you, thank you for your infinite wisdom.
Bob Ratree
March 17, 2019 @ 08:03
It works EXCEPT there must be a space between dir and >list.txt
and it does not produce a list sorted by anything can find
once you learn how to get started and the missing SPACE it works.
why this feature is not built into windows is beyond me. it has been asked for many times
Craig
May 24, 2017 @ 13:36
I would still like to know if you can do all the underlying subdirectories (per the command above) and all the files within those subfolders.
Craig
May 24, 2017 @ 13:10
That works great. Is there a way to print all the files within all the sub-folders within the folder you are printing. Or do I have to go into each sub-folder one at a time a do this for each one?
Craig
May 24, 2017 @ 13:13
Never mind. I see it just above my post.
dir /s /b /o:n /ad > f.txt
Thanks Paul
Paul Smith
December 14, 2016 @ 16:06
This works great for a single directory but it did not give me the listing for the underlying subdirectories!
Paul Bruggink
January 17, 2017 @ 03:12
Try this:
dir /s /b /o:n /ad > f.txt
Joe
October 19, 2016 @ 08:49
It works but if the names of the files are not written in English, then you realize that it was just a waste of time.
Steve Smith
October 14, 2016 @ 11:07
Many thanks for this help – simply explained (I’m of the old XP and now win 10)
Dave M
October 6, 2016 @ 05:46
Is it just me? This actually works? I right-click in the space described, holding down shift key, and… I don’t get this menu you’re talking about. I get a menu, but it doesn’t have a command line option in it. Are you sure this is supposed to work with Win 10? Do I have a different version of Win 10 than everyone else? Because my Windows 10 doesn’t seem to work this way at all.
I can get command line up, but it defaults to a path I can’t change, so I cannot get to the folder I need. Been a while since I’ve worked with the prompt, so I’m stuck.
Arnold
January 22, 2018 @ 14:56
If your Windows 10 has in the menu “Open Power Shell window here”, choose this option (Power Shell is another name for command line) the rest is exactly as explained above.
don
August 16, 2016 @ 12:41
YOU HAVE SOLVED SOMETHING VERY COMPLEX in a SIMPLE WAY. THANK YOU SOOOOO MUCH. I’ve been searching for a VERY LONG TIME FOR A SIMPLE ANSWER