How do I list files on the computer?

Question

How do I list files on the computer?

Answer

MS-DOS and Windows command line users
Linux and Unix users
Windows users

MS-DOS and Windows command line users

To list files while at the MS-DOS prompt or in the Windows command line use the dir command, as shown below. In the below example, is also an example of how the files will be listed when using the dir command. If you need additional examples and syntax for the dir command see the dir command help page.

C:\Windows> dir

Volume in drive C has no label.
Volume Serial Number is A661-AEE8

Directory of C:\Windows

07/26/2011 09:44 AM <DIR> .
07/26/2011 09:44 AM <DIR> ..
07/13/2009 11:32 PM <DIR> addins
06/01/2011 10:24 PM 8,069 AndreaMosaic Setup Log.txt
...
07/13/2009 11:32 PM <DIR> Web
07/13/2009 11:09 PM 403 win.ini
08/01/2011 06:20 PM 1,192,182 WindowsUpdate.log
07/13/2009 07:14 PM 9,728 winhlp32.exe
44 File(s) 496,213,894 bytes
56 Dir(s) 209,343,029,248 bytes free

Linux and Unix users

To list files in a Linux or Unix command line use the ls command, as shown below. If you need additional examples and syntax on the ls command see the ls command help page.

[~/public_html/rss]# ls
./ ../ history.rss issues.rss jargon.rss newjarg.rss newpages.rss newqa.rss

Windows users

Microsoft Windows users who want to list files on the computer can open My Computer or Windows Explorer and open the C: drive.

  • Category
  • DOS Q&A
  • Linux Q&A
  • Solved?
  • Were you able to locate the answer to your question?