CMD List Files: How to List Files in Command Prompt Windows 10/11 - MiniTool Partition Wizard (2024)

  • Home
  • Partition Magic
  • CMD List Files: How to List Files in Command Prompt Windows 10/11

By Ariel | Follow | Last Updated

English

What command can be used to list files in a directory? How to list files in Command Prompt Windows 10/11? A great many people are confused about these questions. In this post, MiniTool explains the Command Prompt list files topic in detail and introduces an alternative to CMD list files.

CMD (Command Prompt) is a powerful Windows built-in tool that can be used to do many works such as CMD copy files, CMD list drives, CMD WiFi password, and more. However, a lot of users don’t how to list files in Command Prompt. Here’s a true example from the StackOverflow forum:

Itried searching for a command that could list all the files in a directory as well as subfolders using a command prompt command. I have read the help for the "dir" command but couldn't find what I was looking for. Please help me with what command could get this.

https://stackoverflow.com/questions/15214486/command-to-list-all-files-in-a-folder-as-well-as-sub-folders-in-windows

Although there are already many discussions and posts about the Command Prompt list files, most of them lack clear steps and screenshots, which makes people difficult to understand the “CMD list files” operation. Thus, we want to write a complete guide to explain it. Let’s keep reading.

What Command Can Be Used to List Files

To list directory CMD smoothly, you need to know what command can be used to list files in a directory Windows first. The answer is to use the DIR command. This command can be used to show all files and subfolders in the current directory. In addition, it displays the file name, size, and last modification date of each file like File Explorer.

The DIR command is available in CMD for almost all Windows systems, including Windows 11/10/8/7/Vista/XP. Here are the most commonly used command lines about the CMD list directory/files:

  • D:List all directories in the current path
  • R:Show read-only files
  • H:Show hidden files
  • A:Archive files
  • S:List system files
  • I:Not content indexed files
  • L:Reparse points
  • -: Add a minus in front of any of the file attribute to let the DIR command not show that kind of file.

How to List Files in Command Prompt Windows 10/11

How to list files in CMD Windows 10/11? The answer depends on what files you want to list. Here we summarize several common examples of the Windows Command Prompt list files.

Step 1. First of all, you need to navigate to the directory in which you want to list files in File Explorer.

Step 2. Click on the address bar and type cmd in the file path and hit Enter, which will open the Command Prompt window.

Tips:

Also, you can locate the directory first in File Explorer, and then press theWin + Rkeys to open theRunbox, typecmdin it, and hitEnterto open the Command Prompt window.

CMD List Files: How to List Files in Command Prompt Windows 10/11 - MiniTool Partition Wizard (1)

Step 3. In the pop-up window, you can list file CMD according to your needs. For example:

Example 1. CMD List all directories and folders under the current path.

dir

CMD List Files: How to List Files in Command Prompt Windows 10/11 - MiniTool Partition Wizard (2)

Example 2. CMD List folders of the current directory only.

dir/ad

CMD List Files: How to List Files in Command Prompt Windows 10/11 - MiniTool Partition Wizard (3)

Example 3. CMD list files only under the directory.

dir/a-d

CMD List Files: How to List Files in Command Prompt Windows 10/11 - MiniTool Partition Wizard (4)

Example 4. CMD list files and folders under a specific directory (e.g. C:Usersdefaultuser1)

cd C:Usersdefaultuser1

dir

CMD List Files: How to List Files in Command Prompt Windows 10/11 - MiniTool Partition Wizard (5)

Example 5. CMD list all system files under the directory.

dir /s

CMD List Files: How to List Files in Command Prompt Windows 10/11 - MiniTool Partition Wizard (6)

Example 6. CMD list all read-only non-achieve files.

dir /a:r-a

CMD List Files: How to List Files in Command Prompt Windows 10/11 - MiniTool Partition Wizard (7)

Example 7. CMD list all files with the file extension .doc.

Tips:

You can replace thedocwith other file extensions such as exe, png, xml, etc.

dir *.doc

CMD List Files: How to List Files in Command Prompt Windows 10/11 - MiniTool Partition Wizard (8)

Example 8. CMD list all files with the file extension .doc and .jpg.

dir *.doc *.jpg

CMD List Files: How to List Files in Command Prompt Windows 10/11 - MiniTool Partition Wizard (9)

Of course, there are many other dir commands to list file CMD on Windows 10/11 and we can’t explain all in this post. If you want to know more information about Windows CMD list files, you can search for corresponding commands online on Google.

Better Alternative to Command Prompt List Files

Although you can list files in a directory CMD, many professional commands might be unfamiliar to you. How to list all files/folders under a directory more easily? MiniTool Partition Wizard is a better alternative to Windows Command Prompt list files.

ItsSpace Analyzerfeature can show all files/folders under a specific path in the file name, size, last change, extension, percentage of drive, etc. In addition, it tells you what files are taking up your disk space and helps you free up disk space.

MiniTool Partition Wizard FreeClick to Download100%Clean & Safe

CMD List Files: How to List Files in Command Prompt Windows 10/11 - MiniTool Partition Wizard (10)

About The Author

Ariel Follow Us

Position: Columnist

Ariel has been working as a highly professional computer-relevant technology editor at MiniTool for many years. She has a strong passion for researching all knowledge related to the computer's disk, partition, and Windows OS. Up till now, she has finished thousands of articles covering a broad range of topics and helped lots of users fix various problems. She focuses on the fields of disk management, OS backup, and PDF editing and provides her readers with insightful and informative content.

CMD List Files: How to List Files in Command Prompt Windows 10/11 - MiniTool Partition Wizard (2024)
Top Articles
[Ethereum Dedicated RPC] Free WEB3 API endpoints for blockchain interaction
Is Property Tax Deductible in Canada?
Use Copilot in Microsoft Teams meetings
Cold Air Intake - High-flow, Roto-mold Tube - TOYOTA TACOMA V6-4.0
What are Dietary Reference Intakes?
Www.craigslist Augusta Ga
Gore Videos Uncensored
Kagtwt
Phillies Espn Schedule
10 Great Things You Might Know Troy McClure From | Topless Robot
Flights To Frankfort Kentucky
Craigslist Apartments In Philly
Chile Crunch Original
WEB.DE Apps zum mailen auf dem SmartPhone, für Ihren Browser und Computer.
1-833-955-4522
Zalog Forum
Everything you need to know about Costco Travel (and why I love it) - The Points Guy
Recap: Noah Syndergaard earns his first L.A. win as Dodgers sweep Cardinals
Rural King Credit Card Minimum Credit Score
Accident On The 210 Freeway Today
Kringloopwinkel Second Sale Roosendaal - Leemstraat 4e
Ford F-350 Models Trim Levels and Packages
Egizi Funeral Home Turnersville Nj
Slim Thug’s Wealth and Wellness: A Journey Beyond Music
Craigslist Apartments In Philly
2000 Ford F-150 for sale - Scottsdale, AZ - craigslist
Mikayla Campinos: Unveiling The Truth Behind The Leaked Content
Creed 3 Showtimes Near Island 16 Cinema De Lux
Craigslist Efficiency For Rent Hialeah
Imagetrend Elite Delaware
APUSH Unit 6 Practice DBQ Prompt Answers & Feedback | AP US History Class Notes | Fiveable
Matlab Kruskal Wallis
Reli Stocktwits
Edward Walk In Clinic Plainfield Il
Black Adam Showtimes Near Amc Deptford 8
What Time Is First Light Tomorrow Morning
Western Gold Gateway
Montrose Colorado Sheriff's Department
The Complete Guide To The Infamous "imskirby Incident"
If You're Getting Your Nails Done, You Absolutely Need to Tip—Here's How Much
Tgirls Philly
Wilson Tire And Auto Service Gambrills Photos
Leland Nc Craigslist
Tacos Diego Hugoton Ks
New Zero Turn Mowers For Sale Near Me
Black Adam Showtimes Near Kerasotes Showplace 14
Tommy Gold Lpsg
Autozone Battery Hold Down
Vcuapi
Latest Posts
Article information

Author: Kelle Weber

Last Updated:

Views: 6656

Rating: 4.2 / 5 (53 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Kelle Weber

Birthday: 2000-08-05

Address: 6796 Juan Square, Markfort, MN 58988

Phone: +8215934114615

Job: Hospitality Director

Hobby: tabletop games, Foreign language learning, Leather crafting, Horseback riding, Swimming, Knapping, Handball

Introduction: My name is Kelle Weber, I am a magnificent, enchanting, fair, joyous, light, determined, joyous person who loves writing and wants to share my knowledge and understanding with you.