List Folder Content

List Folder Content

Problem

I need to print a list of all the files contained inside a folder on a computer.

Solution

  1. Navigate to the folder location which you wish to print the contents.
  2. In the Address bar of Windows File Explorer, type cmd and hit the Enter key.

    1. A Command Prompt will open at that folder location.

  3. Type one of the command lines below, then press the Enter key.
    1. Use for folder level content omitting subfolder contents.
      dir > contents.txt
    2. Use to omit subfolders from be in your list.
      dir /a-d > contents.txt
    3. Use to list contents of folder, subdirectories and subdirectory contents.
      dir /s > contents.txt
    4. Use to get more help using "dir" to display in command prompt window.
      dir /?
  4. The resulting output file, contents.txt, will be inside the folder you are working in. 
Still need help? Contact IT
Use chat window located on this page
Submit a ticket from our support page
Call 410-273-7722


    • Related Articles

    • Discover Application Installations

      Problem Need list of program installations for computer. Solution Use get-wmiobject command in Windows PowerShell 1. Go to and select Windows Start 2. Type PowerShell, and select the Windows PowerShell application 3. Copy and paste the following ...
    • WSL Has Limited Network Connectivity While on VPN

      Problem When offsite or connected only to the VPN, various problems appear within WSL including: Being unable to connect to remote servers. Being unable to access Linux services such as through the apt command. Git pull/push cannot resolve ...
    • Unable to Access Microsoft Teams

      Problem Launching Microsoft Teams Desktop Application results in unknown error.  Solution Try this first. Clear the cache folder by following the steps below. Sign out of Teams > Quit Microsoft Teams by right clicking the icon and select Quit. On ...
    • Search for keywords inside of document using File Explorer

      Problem: I have a lot of documents and can't always remember the contents of them. How do I enable file explorer to search for keywords inside of documents? Solution: This solution does NOT require administrator credentials to perform. 1. Open file ...
    • How to View CAC Certificates Without ActivClient

      Problem SURVICE IT removed ActivClient middleware from SURVICE issued laptops but don't know how to verify, or view my Common Access Card (CAC ) certificates and their usage without the referenced middleware. Solution Go to and select the Windows ...