Dir

Displays a directory file listing.

Syntax

 dir [drive:][path][filename] [...] [/p] [/q] [/w] [/d] [/a[[:]attributes]][/o[[:]sortorder]] [/t[[:]timefield]] [/s] [/b] [/l] [/n] [/x] [/c] [/4] 

Parameters

 

Parameter

Purpose


None

Displays the disk's volume label, serial number, and a listing of its contents.

[drive:][path]

Specifies the drive and path for the folder to be displayed.

[filename]

Specifies a particular file to be displayed.

[/p]

Displays data a screen at a time.

[/q]

Display information about file ownership.

[/w]

Displays the folder listing in multiple columns.

[/d]

Same as /w but sorts files by column.

/a[[:] attributes]

Limits the displays to directories and files that match supplied attributes. The following attributes can be used:

h

Hidden files

s

System files

d

Directories

a

Files ready to be archived

r

Read-only files

-h

Nonhidden files

-s

Nonsystem files

-d

Only display files

-a

Files without changes since the last backup

-r

Non-read-only files

/o [[:]sortorder]

Specifies the sort order used to display directory and file names. The following options can be used:

n

Alphabetically by name

e

Alphabetically by extension

d

By date and time

s

By size

g

Show folders before files

-n

Reverse alphabetical order by name

-e

Reverse alphabetical order by extension

-d

By reverse date and time

-s

By reverse size

-g

Show folders after files

/t [[:]timefield]

Determines the time field used to display or sorting the listing. Valid options:

c

Creation time

a

Last access time

w

Last written time

[/s]

Lists every occurrence of the specified file name.

[/b]

Lists each directory or file name.

[/l]

Displays unsorted lowercase folder and file names.

[/n]

Displays a long list format.

[/x]

Displays the short names.

[/c]

Displays the thousand separator (comma) when showing file sizes.

[/4]

Displays the date in a four-digit year format.



Microsoft Windows XP Professional Administrator's Guide
Microsoft Windows XP Professional Administrators Guide
ISBN: 1931841969
EAN: 2147483647
Year: 2005
Pages: 358

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net