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
We are sorry, the page you requested cannot be found
Top 5 Consumer Discretionary Stocks: September 2024 - NerdWallet
What Is Single Sign-on (SSO)? Meaning and How It Works? | Fortinet
Lengua With A Tilde Crossword
Bashas Elearning
Pga Scores Cbs
Horoscopes and Astrology by Yasmin Boland - Yahoo Lifestyle
Noaa Weather Philadelphia
Horned Stone Skull Cozy Grove
Jet Ski Rental Conneaut Lake Pa
Nichole Monskey
Find your energy supplier
Aktuelle Fahrzeuge von Autohaus Schlögl GmbH & Co. KG in Traunreut
Craigslist Alabama Montgomery
U/Apprenhensive_You8924
Premier Reward Token Rs3
Illinois VIN Check and Lookup
Welcome to GradeBook
67-72 Chevy Truck Parts Craigslist
Lines Ac And Rs Can Best Be Described As
Bidevv Evansville In Online Liquid
Harrison County Wv Arrests This Week
Rugged Gentleman Barber Shop Martinsburg Wv
11526 Lake Ave Cleveland Oh 44102
Craigslist Brandon Vt
Schooology Fcps
Deepwoken: Best Attunement Tier List - Item Level Gaming
County Cricket Championship, day one - scores, radio commentary & live text
Missing 2023 Showtimes Near Grand Theatres - Bismarck
Moonrise Time Tonight Near Me
Most popular Indian web series of 2022 (so far) as per IMDb: Rocket Boys, Panchayat, Mai in top 10
Powerball lottery winning numbers for Saturday, September 7. $112 million jackpot
Craigslist Greencastle
KITCHENAID Tilt-Head Stand Mixer Set 4.8L (Blue) + Balmuda The Pot (White) 5KSM175PSEIC | 31.33% Off | Central Online
Page 5662 – Christianity Today
Cherry Spa Madison
Eastern New Mexico News Obituaries
„Wir sind gut positioniert“
Weather In Allentown-Bethlehem-Easton Metropolitan Area 10 Days
Human Resources / Payroll Information
Canvas Elms Umd
Wzzm Weather Forecast
Bedbathandbeyond Flemington Nj
Meee Ruh
Heat Wave and Summer Temperature Data for Oklahoma City, Oklahoma
Michaelangelo's Monkey Junction
Black Adam Showtimes Near Kerasotes Showplace 14
Puss In Boots: The Last Wish Showtimes Near Valdosta Cinemas
Tyrone Dave Chappelle Show Gif
Zalog Forum
Denys Davydov - Wikitia
Lagrone Funeral Chapel & Crematory Obituaries
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.