5.572 bytes

Service Hints & Tips

Document ID: DJON-3G8K9M

Aptiva - The DIR or Directory command

Applicable to: World-Wide

The DIR (directory) command lists the directory entries. The DIR command is issued from the DOS command prompt. With the use of parameters, the DIR command will only list specific files. The DIR command will not list hidden files, even if they are present in the directory. Through the use of parameters, DIR can list hidden files.

The information that the DIR command provides includes: the volume label, the volume serial number (if one exists), and the amount of free space left on the disk. The display line for each file includes its size (in bytes) and the date and time the file was last changed.

Some common DIR parameters are:

/W = creates a directory listing using the wide format. This parameter does not display the file size, date and time information.

/P = pauses after each screen and waits until you press a key to continue.

/A = displays files with special attributes. The attributes are:
D = Directories R = Read-Only Filesiles H = Hidden Files S = System Files
A = Files ready to Archive - = Prefix meaning "Not"
Example: To view system files that are hidden you would type DIR /ASH

/O = List by files in sorted order. The sorted order options are:
N = By Name (Alphabetic) S = By Size (Smallest First) E = By Extension (Alphabetic) D = By Date and Time (Earliest First) G = Group Directories First - = Prefix to Reverse Order
C = By Compression Ratio (Smallest First)
Example: To view files in the Windows directory in alphabetic order by name, with the largest files listed
first you would type DIR /ON /O-S
/S = displays files in specified directory and all subdirectories.

/B = uses bare format (no heading information or summary).

/L = uses lowercase.

/C[H] = displays file compression ratio; /CH uses host allocation unit size.

/? = lists all parameter options.

For help with parameters, see the DOS on-line HELP system. From the command prompt, enter: HELP DIR or DIR/?.


Search Keywords

DOS

Hint Category

DOS/Windows 3.x

Date Created

17-04-97

Last Updated

09-03-99

Revision Date

09-03-2000

Brand

IBM Aptiva

Product Family

Aptiva, PS/1

Machine Type

2134, 2136, 2137, 2138, 2140, 2142, 2144, 2159, 2161, 2162, 2168, 2176, 2011, 2121, 2123, 2133, 2155

Model

all

TypeModel

2011C01

Retain Tip (if applicable)

Reverse Doclinks
and Admin Purposes