Windows Commands: Displays a list of files and subdirectories in a directory. Lists the contents of a directory.
dir-Windows Command
dir command - Displays a list of files and subdirectories in a directory. Lists the contents of a directory.
Description:
The dir command typed by itself, displays the disk's volume label and serial number; one directory or filename per line, including the filename extension, the file size in bytes, and the date and time the file was last modified; and the total number of files listed, their cumulative size, and the free space (in bytes) remaining on the disk. The command is one of the few commands that exist from the first versions of DOS.
Syntax:
dir [drive:][path][filename] [parameters]
Most commonly used parameters of dir include:
- /W : Displays the listing in wide format, with as many as five filenames or directory names on each line.
- /P : Pause at every page
- /S : Also look in subdirectories
- /Axx: Display files with the specified attributes only
- /Oxx: Modifies sort order
- /B : Uses bare format (no heading information or summary)
- [drive:][path][filename] : To Store Result in a text file;(c:\dir > c:\fileList.txt) (this is not a parameter, it is output redirection)
Possible attributes for the A parameter are D (directories), R (read-only files), H (hidden files), A (files/directories with the archive bit on), and S (system files). The prefix - negates an attribute; attributes can be combined (e.g. /A:DA means directories with the archive bit on).
Possible sort orders are N (name), S (size), E (extension), D (date and time), A (last access date), and G (group directories first). The prefix - reverses the order.
Other less commonly used parameters of dir include:
- /D : Display wide format but sorted by column
- /L : Display forced into lowercase
- /N : Display forced into long file name format instead of 8.3
- /Q : Displays the owner of each file
- /X : Display shows 8.3 names next to long file names
The default parameters of dir can be set using the DIRCMD environment variable.
Equivalent to the Unix command ls (the option -l is "long" list format, it works the opposite way from /w.)
Equivalent in RT-11/RSX-11/OpenVMS operating systems line is directory command which can be contracted to dir.
Other Windows 98, Windows XP Commands:
addusers ,
arp ,
assoc ,
associate ,
at ,
attrib ,
browstat ,
cacls ,
call ,
cd ,
change ,
chkdsk ,
chkntfs ,
choice ,
cipher ,
cleanmgr ,
clip ,
cmd ,
color ,
comp ,
con2prt ,
copy ,
date ,
defrag ,
del ,
delprof ,
dir ,
diruse ,
diskcomp ,
diskcopy ,
doskey ,
dsadd ,
dsmod ,
echo ,
endlocal ,
erase ,
exit ,
expand ,
fc ,
fdisk ,
find ,
findstr ,
for ,
forfiles ,
format ,
fsutil ,
ftp ,
ftype ,
global ,
goto ,
help ,
hfnetchk ,
if ,
ifmember ,
ipconfig ,
kill ,
label ,
ldifde ,
local ,
logevent ,
logoff ,
logtime ,
mapisend ,
md ,
mem ,
mode ,
monitor ,
more ,
mountvol ,
move ,
moveuser ,
msg ,
msiexec ,
msinfo32 ,
mstsc ,
munge ,
mv ,
nbtstat ,
net ,
netdom ,
netsh ,
netstat ,
netsvc ,
now ,
nslookup ,
ntbackup ,
ntrights ,
path ,
pathping ,
pause ,
perms ,
ping ,
popd ,
portqry ,
print ,
prncnfg ,
prnmngr ,
prompt ,
pushd ,
qgrep ,
rasdial ,
rasphone ,
rd and ,
rdisk ,
recover ,
reg ,
regedit ,
regsvr32 ,
rem ,
renc ,
replace ,
rmtshare ,
robocopy ,
route ,
runas ,
rundll32 ,
sc ,
schtasks ,
sclist ,
scriptit ,
set ,
setlocal ,
setx ,
share ,
shift ,
shortcut ,
showgrps ,
showmbrs ,
shutdown ,
sleep ,
soon ,
sort ,
start ,
su ,
subinacl ,
subst ,
tasklist ,
time ,
timeout ,
title ,
touch ,
tracert ,
type ,
ver ,
verify ,
vol ,
where ,
whoami ,
windiff ,
winmsd ,
winmsdp ,
wmic ,
xcacls ,
xcopy ,
Live2Support.com :
This dialog window can be moved, resized, maximized, minimized, restored and closed with the 'x' icon.