Command Line

Command DIR

Function:

Displays a sorted list of files and sub-directories in a directory.
Syntax:
DIR [drive:][path][filename] [/P] [/W] [/A[[:]attributes]] [/O[[:]order]] [/T[[:]timefield] [/V] [/N] [/F] [/B] [/J] [/S] [/L]
[drive:][path][filename]Specifies the drive, directory, and/or files to list.
/PIgnored.
/WUses wide list format.
/ADisplays files with specified attributes, where attributes are :-
DDirectories
RRead-only files
HHidden files
AArchive files
SSystem files
-Prefix meaning NOT
/ODisplay files sorted in the specified order, where order is :-
GGroup directories first
NBy name (alphabetic)
EBy file extensions
DBy file date and time (earliest first)
SBy file size (smallest first)
-Prefix to reverse the order
/TDisplay or sort on this timefield. where timefield is :-
CCreation
ALast access
WWrite
/VDisplay Volume Name and Serial Number.
/NUses new long file name directory format.
/FUses 8.3 file name directory format, when possible.
/BUses bear format (only display file names).
/JRight justified file name extensions for 8.3 file names.
/SProcess sub-directories.
/LDisplay file names in lower case.
Note:
  • When the /F switch is specified and a directory contains files that conform to the 8.3 file naming convention, then regardless of the file system, the directory listing will be formatted with file names on the left hand side of the listing, otherwise the new long file name directory format is used. In the new long file name directory format the file names appear on the right hand side of the listing.
  • Switches that are preset in the DIRCMD environment variable are ignored.
  • Also see command DEVICES.

Copyright © 1995-2005 Lucien Cinc, All Rights Reserved
WinOne is an Australian registered trademark of Lucien Cinc