• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

OrganicWeb

Mailchimp Training & Consulting

  • Home
  • Services
    • Mailchimp Training
    • Mailchimp Consulting
  • Free Tools
    • Mailchimp Tutorials on YouTube
    • Subject Line Generator
    • Marketing Ideas Generator
    • Map Maker for Email
    • WhatsApp Click to Chat Generator
    • Avoid Email Going to Spam
    • Email Link Generator
    • Is Mailchimp Down?
    • Marketing Facts and Stats
  • Content
    • Blog
    • Videos
  • Contact & About
    • Contact
    • About

The easy way to print a list of folders and files in Windows

Learn how to print a list of all files and foldersHere are some very quick and simple instructions on how to create a text file listing all files and folders in a certain Windows directory. It’ll only take a minute.

Windows 10 Instructions

  1. In Windows Explorer go to the location of the folder which you want to print a contents list.
  2. Press Alt -> D on your keyboard (the address bar of Windows Explorer will now be in focus).
  3. Type cmd and press Enter. (the command prompt will open in the path that you chose above).
  4. Copy and paste the following to the command prompt:
    dir > files_and_folders.txt
  5. Press Enter on your keyboard.

In your directory you’ll now have a file called files_and_folders.txt that lists your folders and files.

Windows 2012 Server Instructions

  1. In Windows Explorer go to the location of the folder which you want to print a contents list.
  2. Press Shift and alternate mouse click on your folder in Windows Explorer
  3. Click Open command window here.
  4. Copy and paste the following to the command prompt:
    dir > files_and_folders.txt
  5. Press Enter on your keyboard.

Per the Windows 10 instructions, you’ll now have a file called files_and_folders.txt that lists your folders and files.

Found this useful? Please share:

Related

  • Fix Windows 10 Time Problem
  • How to get Mailchimp Subscriber Popup working in WordPress
  • Fix Excel ‘Not responding’ in Windows 10

Filed Under: General Technology

Watch Gary in action

Gary frequently adds Mailchimp instructional videos to his YouTube channel. Subscribe to keep updated.

→  Subscribe   ←

How to add an editable attachment to a Mailchimp campaign.

How to add, and send, coupon codes in Mailchimp.

Reader Interactions

Comments

  1. Bill says

    April 20, 2017 at 1:17 am

    Try the freeware program “YourDir”. It is a little quirky (you can only export to a csv. file) but it does the job fairly fast and accurately. I’ve used it since my early XP days and it still works just fine in windows 10. I’ve been able to get a complete listing of files on directory trees with 100,000 files and subdirectories.

    Reply
  2. Glenn Dixon says

    May 22, 2017 at 10:13 am

    excellent tips – thanks!

    Reply
  3. Richard Robinson says

    September 12, 2017 at 8:45 am

    The Windows 10 advice above worked great and really bailed me out. Somewhat amazing though that you can’t really do this in Windows 10 with a menu option as you might expect. You have to execute an MS/DOS command from the command window to get it done. Wow.

    Reply
  4. charlesmarriage says

    October 1, 2017 at 11:55 pm

    Unworkable unless you know how windos 10 works. I didn’t, so the tipe was useless. Sorry

    Reply
  5. RICHARD ALLEN says

    November 22, 2017 at 2:24 am

    HAVE THE FILE “FOLDERS AND FILES” BUT IT WOULDN’T OPEN UNTIL I CHOSE “OPEN IN MSWORD.” THANKS FOR THE HELP.

    Reply
  6. 1111a says

    December 23, 2017 at 7:21 am

    Doesnt work alt D on windows 10

    Reply
    • Gary says

      December 26, 2017 at 6:29 pm

      I’m running Windows 10 and Alt-D works for me.

      Reply
  7. fogharty says

    January 12, 2018 at 9:45 am

    Alt-D wants to delete the folder. Windows 10 here as well.

    Reply
    • Gary says

      January 12, 2018 at 8:59 pm

      Alt+d should select the address bar – see https://support.microsoft.com/en-au/help/12445/windows-keyboard-shortcuts

      Reply
  8. Lisa J says

    January 20, 2018 at 7:28 am

    thanks! this worked for me as well

    Reply
  9. Nancy Sanchez says

    January 27, 2018 at 12:15 pm

    Is there a way to get the entire tree, including subdirectories and sub-subdirectories?

    Reply
  10. Glenn says

    February 11, 2018 at 7:09 pm

    thank you. im in shock. ive been using windows since like day one and I never knew this. it just shows that you can always learn. its so useful too. really im in shock that I never knew this. im a programmer, have been for over 35 years and it still amazes me that you can learn something new every day. just shows I should read more instruction documents lol thanks mate

    Reply
  11. Marlene Case says

    March 10, 2018 at 6:27 am

    I just tried this, but all it gave me was a list of 20 recent files, not a list of all the files in the folder I chose.

    Reply
  12. ericparoissien says

    April 19, 2018 at 3:41 am

    Thanks a lot, perfect!

    Reply
  13. mark says

    April 19, 2018 at 5:42 am

    Does not work with UNC Names as cmd does not support UNC naming.

    Reply
  14. gman1943 says

    May 6, 2018 at 5:21 am

    I get “access denied” from one external disk when i hit “all files and folders”

    Reply
  15. Emil Novak says

    July 9, 2018 at 7:23 pm

    Does not work with UNC Names – just map it as a network drive and it works.

    Reply
  16. Jo says

    July 12, 2018 at 1:27 pm

    In XP(?) you could print the entire file tree. How can this be done in Windows 10? Other than downloading & using an outside app?

    Reply
  17. Joe says

    July 24, 2018 at 9:17 pm

    nice tip. Try also “tree /f /a > file.txt” for a nicely formatted tree

    Reply
  18. WILLIAM BROGLEY says

    October 23, 2018 at 4:02 am

    Thanks. That was very helpful.

    Reply
  19. Claire Black says

    December 19, 2018 at 5:59 am

    If the methods above are not working, try this:

    From the start button, select Windows Accessories
    Click on Notepad in the Widows Accessories list to open it.
    In Notepad, select File and then select Open.
    In the Open dialog box, navigate to the folder whose contents you want to print.
    When the folder is selected, a file is displayed called “printit”.
    Double-click the printit file.
    You can now print or copy the text. 🙂

    Reply
  20. Alexandra Barber says

    December 19, 2018 at 10:38 am

    actually not useless and works the same in windows 7 as it does in windows 10. just follow it thru, have to right click to paste as you cannot ctrl v the entry.

    Reply
  21. Jim Cianci says

    January 4, 2019 at 12:42 am

    yes! simply add “/s” to include subdirectories, here are a couple options 1) “dir *.*/s>myfile.txt” will give you all directories and files 2) “dir *./s>myfile.txt” for directories only (and other files with no extension, notice there’s no asterisk after the dot). For those who are unfamiliar with doing this in any version of windows, simply run the “Command Prompt” application, from there enter the drive letter you want “O:”, then change to the target directory “CD mystuff\coolfiles”, then you can simply execute the “Dir” command above. I hope this helps.

    Reply
  22. phillip newmarch says

    January 10, 2019 at 10:23 am

    AhHA! Brilliant! Thank you!

    Reply
  23. Dave says

    February 9, 2019 at 7:37 am

    Yes, this works nicely! Displays all subfolders and files.

    Reply
  24. John says

    April 4, 2019 at 8:45 pm

    Great tip for the tree …

    Reply
  25. Alan Barry says

    July 4, 2019 at 12:50 am

    Yes, just add “/s” to the command, to indicate you want subdirectories. You might get a large report though!

    Reply
  26. Stephen Settimi says

    August 7, 2019 at 10:01 pm

    Rather than going to a DOS cmd prompt, or capturing an printing an image of a directory as other sites advise, use your browser. CMD prompts require exact syntax. This can be a frustrating challenge when directories are deeply nested in the file system. And of course, capturing an image of a directory listing and printing it is not the same as printing an actual list of files in a directory which you might want to modify for presentation: Here is the easiest way to get an editable and printable file listing: In your browser enter: file:///C:/Users/Home/[directoryname]/. Then print it, or copy/paste the HTML page elsewhere.

    Reply
  27. AW says

    August 27, 2019 at 8:20 am

    The tree format is so nice…thanks!

    Reply
  28. Danny Thomas says

    December 25, 2019 at 12:01 pm

    change entry to dir/s > (you can use any text here).txt press enter. It will list the all files from the root.

    Reply
  29. Elena Lounejeva says

    January 7, 2020 at 4:48 pm

    Alt+D and cmd – if I knew it before! thank you Gary.

    Reply
  30. Debi says

    February 6, 2020 at 8:01 am

    what it will do is make the address in the address bad highlight. Then you just type in the cmd and hit enter, and it will open a new window. They probably could have used some illustrations or screen shots to show how to do it. However, if does work with Windows 10.

    Reply
  31. Theo G says

    May 9, 2020 at 12:02 pm

    This worked perfectly in Win 10 instead of “dir > files_and_folders.txt” as written at the top of the page which only seemed to give me the file and folder names in the directory I targeted.

    This gave a full file list of everything in the directory and sub directories.

    Reply
  32. T. Reginald Knight says

    June 1, 2020 at 8:23 pm

    I started programming back when we used BASIC and FORTRAN, so DOS doesn’t frighten me all that much. What I find amazing is the fact that it never occurred to anyone that being able to print out what is essentially a Table of Contents/Index might be a useful thing? Because, having to go through all of this is quite ridiculous.
    It’s A List. We live on lists — thrive on list — and we can’t print one?

    Reply
  33. Anil Pradhan says

    August 6, 2020 at 10:57 pm

    Here is the EASIEST way to print a listing of your folder:

    01. Download a free utility, ‘printdir’ from https://www.softpedia.com/get/System/File-Management/PrintDir.shtml

    02. Create a directory named ‘TEMP’ in your C:\dirive if you don’t have one already. Use CAPS in your directory name.

    03. Copy and paste this batchfile to the directory of which you want a listing.

    04. Highlight the batchfile name and press ‘Enter’.

    05. In a flash, the batchfile will complete its task.

    06. Navigate to C:\TEMP.

    07. A file named ‘directory’ will be there.

    08. Open with either Notepad or your favourite wordprocesser.

    09. The listing of all the fiiles, including other details, will be there.
    /
    10. Edit it to your heart’s content and save it as you wish!!!

    Reply
  34. A. Danzig says

    December 9, 2020 at 12:32 pm

    I’ve tried all of the suggestions in DOS and get “Access is Denied” each time. How do I allow the system to let me access my own laptop?

    Reply
  35. Mark Oldfield says

    May 20, 2021 at 9:08 am

    Great method. Far easier than many others (and clearer) plus no need to set up extra directories or copy/paste/run batch files.

    Worked exactly as suggested for Win10 – still going 4 years later.

    Reply
  36. Support Team says

    July 28, 2021 at 8:33 pm

    So helpful!
    Thank you!

    Reply
  37. Chris Copland says

    February 2, 2022 at 8:12 am

    Totally Top Tip….Straight to the solution

    Reply
  38. BOTnPAID4 says

    March 22, 2022 at 12:53 am

    Thank you for the print list method. Perfect for what I needed

    Reply

Leave a Reply Cancel reply

You are here: Home / General Technology / The easy way to print a list of folders and files in Windows

Primary Sidebar

Mailchimp write about my work

Read on Mailchimp.com

Learn from a Mailchimp Pro Partner

Signup to receive info about Gary's Mailchimp beginner and advanced classes.

Sign up

Gary on Australian National Radio

Changes are coming to the Australian Spam Act

Read Gary's article in SmartCompany

Meet Gary, Mailchimp Expert

Gary is a Mailchimp Expert and Partner. He delivers Mailchimp training and consulting services in Australia, New Zealand and Singapore. Gary presents at Mailchimp events and hosts the first, and only, Australian Mailchimp sponsored event. He is M.B.A. qualified from Henley Business School, U.K.

Contact Gary for your Mailchimp needs

Footer

Customer Rating

Mailchimp Pro Partners

Contact

Contact Gary for all your Mailchimp training, consulting and integration needs.

Contact Gary.

Copyright © 2022 · Sitemap · ABN: 40800872179 · Privacy Policy · Terms of Service