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


  1. Posts : 153
    Win 7 x64
       #1

    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 Computer


  2. Posts : 2,726
    Windows 7 Ultimate 64bit
       #2

    Dir *.* /s

    Put the kettle on it might take a while
      My Computer


  3. Posts : 17,545
    Windows 10 Pro x64 EN-GB
       #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.

    Kari
      My Computer


  4. Posts : 72,050
    64-bit Windows 11 Pro for Workstations
       #4

    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,
    Shawn
      My Computer


  5. Posts : 1,261
    Windows 7 Professional 32-bit SP1
       #5

    donnyb said:
    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 Computer


  6. Posts : 17,545
    Windows 10 Pro x64 EN-GB
       #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.

    Kari
      My Computer


  7. Posts : 153
    Win 7 x64
    Thread Starter
       #7

    Everything Search Engine

    Thanks for the help. I also found this utility that does exactly what I need.
      My Computer


  8. Posts : 17
    Windows 7 Home Premium Version 32 bit
       #8

    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 Computer


 

  Related Discussions
Our Sites
Site Links
About 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 06:00.
Find Us