Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: How to get a list of all files on one drive only

06 Jun 2010   #1

Win 7 x64
How to get a list of all files on one drive only

This seems so simple, but I don't see how to do it. I want to have a list of all files on my C: drive or maybe on my D: drive, etc. In the old days it was DIR *.*
I am using Win 7 - 64.

My System SpecsSystem Spec
06 Jun 2010   #2
PooMan UK

Windows 7 Ultimate 64bit

Dir *.* /s

Put the kettle on it might take a while
My System SpecsSystem Spec
06 Jun 2010   #3


Dir *.* has always shown only the files and subfolders of the current folder. If you also want to see all files in the subfolders, the command is dir /s. Because this command shows everything, wildcard *.* is not needed.

I use this freeware to do it more elegantly.

My System SpecsSystem Spec

07 Jun 2010   #4

64-bit Windows 10 Pro

Hello Donny,

In addition, you might find this below helpful for this. It will add View File Directory to the context menu so that you can right click on the C: drive in Computer and click on View File Directory to see every file listed. You also have the option to Print File Directory.

Context Menu - Add View and Print File Directory - Vista Forums

Hope this helps,
My System SpecsSystem Spec
07 Jun 2010   #5

Windows 7 Ultimate x64

Quote   Quote: Originally Posted by donnyb View Post
This seems so simple, but I don't see how to do it. I want to have a list of all files on my C: drive or maybe on my D: drive, etc. In the old days it was DIR *.*
I am using Win 7 - 64.
Try this (all commands in quotes should be typed without the quotes):
  1. Press <WINDOWS_KEY>+<R> to open the Run box
  2. type "CMD", and press <ENTER> to launch the command line utility
  3. Type "D:" and press <ENTER> to go to that drive (Change D to whatever drive letter you need - provided that the drive exists, of course)
  4. type "CD\" and press <ENTER> to go to the root folder of the drive
  5. Now, here is where this get interesting. Use one of the following:
To get a file listing that include such things as file dates, sizes, etc, type the following command, followed by <ENTER>
  • "DIR *.* /s"
This could take awhile, so be patient. If all you want is a raw list of files, then use the following command, which shows all files with fully-qualified pathnames in the list:
  • "DIR *.* /s /b"
If you want to have the listing sorted, just add "/ogen" to either of the above commands ("/o" tells dirs to sort the list, "g" puts folders at the top, "e" sorts by extension, "n" by name - in that order). For example:
  • "DIR *.* /s /b /ogen"
If you want to include hidden files/folders, just add "/a". For example:
  • "DIR *.* /s /b /ogen /a"
If you only want to see folders, then add "/d" to the command (really usefull only if you are using "/b" also:
  • "DIR *.* /s /b /d"
It is also possible to redirect the output to file or the clipboard, regardless of which of the above forms of DIR you use:
  • "DIR *.* /s /b >LIST.TXT" will create a text file named LIST.TXT in the current folder, and will contain the desired output of the DIR command. You can specify you own filename if you like, just remember to enclose the filename in quotes if it contains spaces, For example "DIR *.* >"Files List.txt""
  • "DIR *.* /s /b | CLIP" will send the output of the DIR command to the windows clipboard.
If you want more information on DIR, use the following command to display all available command-line switches:
  • "DIR /?"
This may sound extremely odd, but I use the DIR command alot when I need a list of files that I can paste into Excel when I want to do a once-off processing of the files to maybe cretae a batch file to rename or copy them, and the task at hand does not warrant the creation of a program in Delphi.
My System SpecsSystem Spec
07 Jun 2010   #6


Guys, it's not a big deal but I'll say it once more: the wildcards *.* (every file & folder with any extension) are not needed with DIR /S command. The /S switch already tells computer to show all files and folders.

My System SpecsSystem Spec
07 Jun 2010   #7

Win 7 x64

Everything Search Engine

Thanks for the help. I also found this utility that does exactly what I need.
My System SpecsSystem Spec
25 Mar 2014   #8

Windows 7 Home Premium Version 32 bit

Get Everything here . . and awesome program . . when you run it, it starts by listing every file on a hard drive, or on all your internal and external drives . . enter a file name and it will look it up . . I use it constantly.
My System SpecsSystem Spec

 How to get a list of all files on one drive only

Thread Tools

Similar help and support threads
Thread Forum
How to list empty files using cmd.ext
Hello. I am in need of listing all the empty folders on a subfolder. Cmd.exe seems like it would be the perfect route to go. In the past, I have listed all the files in a directory to a text file. I am looking to do the same with empty folders, as I need to know if I'm missing audio,...
General Discussion
List of REG Files
Hello, I was wondering if there was a list of REG files you offer and what each one does. I'm running a computer lab that consists of 10 computers that I want all settings to be exact. I've changed a few REG files already, but right now I'm wondering if there was a list of all the REG files...
FTP Files List to Text
I need a temporary solution to copy a selected list of files via ftp as text to notepad ? My current FTP client can't do this.
List Files in Folder With Ignore List
Edit: Sorry I made the topic an forgot to change the title. Should be: "List Files in Folder With Ignore List" or something along those lines. I'm a game server admin. What I want to do is generate a text file which will be used when I launch the server. An example of the text file I want to...
General Discussion
List of Files
In Windows XP and I believe it worked in Vista there was a command line prompt to create a txt file listing all the subfolders and files for a directory. This is the prompt I use in Win XP and it works and creates a txt file with a list on my C drive. I have tried this in Windows 7...
General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 15:39.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App