Networking, Programming and Graphics Tutorials

List an directory in DOS window [1/2]

Type: Code Networking, Programming and Graphics Tutorials
List an directory in DOS window
Level: Beginner Networking, Programming and Graphics Tutorials 
List an directory in DOS window
Date: 2007-Feb-13
List an directory in DOS window
Visited: 1833 times
List an directory in DOS window
Rating: List an directory in DOS window
List an directory in DOS window
Author: Ivory Morhuld

This tutorial will show you how to list files in one folder under DOS.

When you stay at DOS prompt ( C:\> ) type 'dir' and hit Enter key. Like shown below list with entire files in current folder ( \WINDOWS\Temp ) will be displayed.

C:\WINDOWS\Temp>dir
 Volume in drive C has no label.
 Volume Serial Number is AC77-A589

 Directory of C:\WINDOWS\Temp

02/13/2007  10:42 AM    <DIR>          .
02/13/2007  10:42 AM    <DIR>          ..
01/09/2007  09:56 AM    <DIR>          DAC_TMP
12/13/2005  11:01 AM            16,384 Perflib_Perfdata_d8.dat
01/09/2007  09:56 AM    <DIR>          ~KXI1A22.TMP
               1 File(s)         16,384 bytes
               4 Dir(s)   1,656,700,928 bytes free

C:\WINDOWS\Temp>
If you want to list the files in folder and the list is more than one screen first files will be hidden from you when the go above first line of your screen. Here we can use /p option of dir command to separate listing on pages.

When you hit some from keyboard listing of files by pages will be continued.

C:\WINDOWS>dir /p
 Volume in drive C has no label.
 Volume Serial Number is AC77-A589

 Directory of C:\WINDOWS

01/30/2007  01:12 PM    <DIR>          .
01/30/2007  01:12 PM    <DIR>          ..
01/05/2007  02:13 PM                 0 0.log
07/17/2004  10:40 AM            19,528 002468_.tmp
03/08/2006  12:07 PM               490 1my.ini
07/20/2004  10:16 AM                35 A6W.INI
07/20/2004  10:16 AM    <DIR>          A6W_DATA
03/24/2004  01:23 PM    <DIR>          addins
07/17/2003  10:21 AM            63,652 anvmsg.ini
07/24/2003  02:19 PM           380,928 anvshell.exe
10/20/2003  02:03 PM               658 anvshell.ini
10/21/2003  12:26 PM           204,800 anvunis.exe
09/07/2004  09:40 AM    <DIR>          AppPatch
09/16/2002  04:11 AM               545 ARJ.PIF
03/31/2004  01:55 PM             1,309 Ascd_tmp.ini
03/25/2003  04:00 PM             1,688 AUTOEXEC.NT
07/20/2004  10:16 AM               179 AWSHKWV.INI
08/19/2004  03:32 PM            43,520 AWuninstall.exe
08/23/2001  02:00 PM             1,272 Blue Lace 16.bmp
02/07/2000  10:36 AM           633,557 cd32.exe
08/23/2001  02:00 PM            82,944 clock.avi
11/19/2002  03:43 PM            22,178 cmaudio.dat
03/31/2004  01:50 PM                26 CMCDPLAY.INI
11/19/2002  03:46 PM            39,104 cmijack.dat
09/04/2004  09:31 AM               200 cmsetacl.log
07/11/2002  12:13 PM           135,168 cmuninst.dat
07/11/2002  11:24 AM           139,264 cmuninst.exe
08/23/2001  02:00 PM            17,062 Coffee Bean.bmp
01/26/2007  04:34 PM           302,357 comsetup.log
03/24/2004  01:23 PM    <DIR>          Config
10/26/2005  03:18 PM             2,577 CONFIG.NT
03/24/2004  01:23 PM    <DIR>          Connection Wizard
03/24/2004  12:04 PM                 0 control.ini
01/21/2005  06:46 PM            73,728 copyfstq.exe
07/06/1999  12:09 PM            28,252 corelpf.lrs
03/24/2004  12:00 PM    <DIR>          Cursors
01/09/2007  09:56 AM             1,734 dacc.ini
Press any key to continue . . .
Networking, Programming and Graphics Tutorials - List an directory in DOS window [1/2] - Networking, Programming and Graphics Tutorials

Need a specific tutorial? Do not hesitate and submit a request!
Related Tags: c++ list files in directory in dos  how to find a directory in dos  dos + dir + exclude directory  plesk password directory  psa vhost change directory  openbase_dir exclude directory  DOS show folders in directory  dir command exclude directory dos  directory dir dos prompt 2 levels how-to  directory folder listing using dos  tmp directory under plesk domain  starting dir command directory  plesk apache directory folder  plesk linux php set include directory  plesk ftp directory vhost.conf  plesk change Root Directory  how to change root directory plesk  how to change the vhosts directory at plesk  windows mput copy directory  ftp command mput to copy directory