Sei sulla pagina 1di 264

COMMAND

ANSI.SYS
APPEND
ARP
ASSIGN
ASSOC
AT
ATMADM
ATTRIB
BATCH
BOOTCFG
BREAK
CACLS
CALL
CD
CHCP
CHDIR
CHKDSK
CHKNTFS
CHOICE
CLS
CMD
COLOR
COMMAND
COMP
COMPACT
CONTROL
CONVERT
COPY
CTTY
DATE
DEBUG
DEFRAG
DEL
DELETE
DELTREE
DIR
DISABLE
DISKCOMP
DISKCOPY
DOSKEY
DOSSHELL
DRIVPARM
ECHO
EDIT

EDLIN
EMM386
ENABLE
ENDLOCAL
ERASE
EXIT
EXPAND
EXTRACT
FASTHELP
FC
FDISK
FIND
FINDSTR
FIXBOOT
FIXMBR
FOR
FORMAT
FTP
FTYPE
GOTO
GRAFTABL
HELP
IF
IFSHLP.SYS
IPCONFIG
KEYB
LABEL
LH
LISTSVC
LOADFIX
LOADHIGH
LOCK
LOGON
MAP
MD
MEM
MKDIR
MODE
MORE
MOVE
MSAV
MSD
MSCDEX
NBTSTAT
NET
NETSH

NETSTAT
NLSFUNC
NSLOOKUP
PATH
PATHPING
PAUSE
PING
POPD
POWER
PRINT
PROMPT
PUSHD
QBASIC
RD
REN
RENAME
RMDIR
ROUTE
RUNAS
SCANDISK
SCANREG
SET
SETLOCAL
SETVER
SHARE
SHIFT
SHUTDOWN
SMARTDRV
SORT
START
SUBST
SWITCHES
SYS
TELNET
TIME
TITLE
TRACERT
TREE
TYPE
UNDELETE
UNFORMAT
UNLOCK
VER
VERIFY
VOL
XCOPY

DOS Command Index


Information about all current DOS commands
Fromthebook
DOStheEasyWay
byEverettMurdockPh.D.
CLICKHEREforinformationaboutdownloadingthebookDOStheEasyWay.

Click on a command name for complete information about that command and examples of its use.
APPEND
(External)
APPEND;
APPEND[d:]path[;][d:]path[...]
APPEND[/X:on|off][/path:on|off][/E]

Displaysorsetsthesearchpathfordatafiles.DOSwillsearchthespecifiedpath(s)ifthefileisnotfoundinthecu
ASSIGN
(External)
ASSIGNx=y[...]/sta
Redirectsdiskdriverequeststoadifferentdrive.
ATTRIB
(External)
ATTRIB[d:][path]filename[/S]
ATTRIB[+R|-R][+A|-A][+S|-S][+H|-H][d:][path]filename[/S]
Setsordisplaystheread-only,archive,system,andhiddenattributesofafileordirectory.
BACKUP
(External)

BACKUPd:[path][filename]d:[/S][/M][/A][/F:(size)][/P][/D:date][/T:time][/L:[path]filename]

Makesabackupcopyofoneormorefiles.(InDOSVersion6,thisprogramisstoredontheDOSsupplementaldis
BREAK
(Internal)
BREAK=on|off

UsedfromtheDOSpromptorinabatchfileorintheCONFIG.SYSfiletoset(ordisplay)whetherornotDOSshou
BUFFERS
(Internal)
BUFFERS=(number),(read-aheadnumber)

UsedintheCONFIG.SYSfiletosetthenumberofdiskbuffers(number)thatwillbeavailableforuseduringdatain
CALL
(Internal)
CALL[d:][path]batchfilename[options]
Callsanotherbatchfileandthenreturnstocurrentbatchfiletocontinue.
CHCP
(Internal)
CHCP(codepage)
DisplaysthecurrentcodepageorchangesthecodepagethatDOSwilluse.
CHDIR
(Internal)
CHDIR(CD)[d:]path
CHDIR(CD)[..]
Displaysworking(current)directoryand/orchangestoadifferentdirectory.
CHKDSK

(External)
CHKDSK[d:][path][filename][/F][/V]
Checksadiskandprovidesafileandmemorystatusreport.
CHOICE
(Internal)
CHOICE[/C[:]keys][/N][/S][/T[:]c,nn][text]
Usedtoprovideapromptsothatausercanmakeachoicewhileabatchprogramisrunning.
CLS(ClearScreen)
(Internal)
CLS
Clears(erases)thescreen.
COMMAND
(External)
COMMAND[d:][path][device][/P][/E:(size)][/MSG][/Y[/C(command)|/K(command)]
StartsanewversionoftheDOScommandprocessor(theprogramthatloadstheDOSInternalprograms).
COMP
(External)
COMP[d:][path][filename][d:][path][filename][/A][/C][/D][/L][/N:(number)]
Comparestwogroupsoffilestofindinformationthatdoesnotmatch.(SeeFCcommand).
COPY
(Internal)
COPY[/Y|-Y][/A][/B][d:][path]filename[/A][/B][d:][path][filename][/V]
or
COPY[/Y|-Y][/A][/B][d:][path]filename+[d:][path]filename[...][d:][path][filename][/V]

Copiesandappendsfiles.
COUNTRY
(Internal)
COUNTRY=countrycode,[codepage][,][d:][filename]
UsedintheCONFIG.SYSfiletotellDOStousecountry-specifictextconventionsduringprocessing.
CTTY
(Internal)
CTTY(device)
ChangesthestandardI/O(Input/Output)devicetoanauxiliarydevice.
DATE
(Internal)
DATEmm-dd-yy
Displaysand/orsetsthesystemdate.
DBLSPACE
(External)
DBLSPACE/automount=drives
DBLSPACE/chkdsk[/F][d:]
DBLSPACE/compressd:[/newdrive=host:][/reserve=size][/F]
DBLSPACE/created:[/newdrive=host:][/reserve=size][/size=size]
DBLSPACE/defragment[d:]]/F]
DBLSPACE/deleted:
DBLSPACE/doubleguard=0|1
DBLSPACE/formatd:
DBLSPACE[/info][d:]
DBLSPACE/list
DBLSPACE/mount[=nnn]host:[/newdrive=d:]
DBLSPACE/ratio[=ratio][d:][/all]
DBLSPACE/size[=size][/reserve=size]d:
DBLSPACE/uncompressd:
DBLSPACE/unmount[d:]

AprogramavailablewithDOS6.0thatallowsyoutocompressinformationonadisk.
DEBUG
(External)
DEBUG[pathname][parameters]
AnMS-DOSutilityusedtotestandeditprograms.
DEFRAG
(External)
DEFRAG[d:][/F][/S[:]order][/B][/skiphigh[/LCD|/BW|/GO][/H]
DEFRAG[d:][/V][/B][/skiphigh][/LCD]|/BW|/GO][/H]
Optimizesdiskperformancebyreorganizingthefilesonthedisk.
DEL(ERASE)
(Internal)
DEL(ERASE)[d:][path]filename[/P]
Deletes(erases)filesfromdisk.
DELOLDOS
(External)
DELOLDOS[/B]
DeletesallfilesfrompreviousversionsofDOSaftera5.0or6.0installation.
DELTREE
(External)
DELTREE[/Y][d:]path[d:]path[...]
Deletes(erases)adirectoryincludingallfilesandsubdirectoriesthatareinit.
DEVICE

(Internal)
DEVICE=(drivername)
UsedintheCONFIG.SYSfiletotellDOSwhichdevicedrivertoload.
DEVICEHIGH
(Internal)
DEVICEHIGH=(drivername)

LikeDEVICE,DEVICEHIGHisusedintheCONFIG.SYSfiletotellDOSwhichdevicedriversoftwaretouseforde
DIR
(Internal)
DIR[d:][path][filename][/A:(attributes)][/O:(order)][/B][/C][/CH][/L][/S][/P][/W]
Displaysdirectoryoffilesanddirectoriesstoredondisk.
DISKCOMP
(External)
DISKCOMP[d:][d:][/1][/8]
Comparesthecontentsoftwodiskettes.
DISKCOPY
(External)
DISKCOPY[d:][d:][/1][/V][/M]
Makesanexactcopyofadiskette.
DOS
(Internal)
DOS=[high|low],[umb|noumb]

UsedintheCONFIG.SYSfiletospecifythememorylocationforDOS.ItisusedtoloadDOSintotheuppermemo

DOSKEY
(External)
DOSKEY[reinstall][/bufsize=size][/macros][/history][/insert|/overstrike][macroname=[text]]
LoadstheDoskeyprogramintomemorywhichcanbeusedtorecallDOScommandssothatyoucaneditthem.
DOSSHELL
(External)
DOSSHELL[/B][/G:[resolution][n]]|[/T:[resolution][n]]
Initiatesthegraphicshellprogramusingthespecifiedscreenresolution.
DRIVPARM
(Internal)
DRIVPARM=/D:(number)[/C][/F:(formfactor)][/H:(number)][/I][/N][/S:(number)][/T:(tracks)]
UsedintheCONFIG.SYSfiletosetparametersforadiskdrive.
ECHO
(Internal)
ECHOon|off
ECHO(message)
Displaysmessagesorturnsonoroffthedisplayofcommandsinabatchfile.
EDIT
(External)
EDIT[d:][path]filename[/B][/G][/H][/NOHI]
StartstheMS-DOSeditor,atexteditorusedtocreateandeditASCIItextfiles.
EMM386
(External)
EMM386[on|off|auto][w=on|off]

EnablesordisablesEMM386expanded-memorysupportonacomputerwithan80386orhigherprocessor.
EXE2BIN
(External)
EXE2BIN[d:][path]filename[d:][path]filename
Converts.EXE(executable)filestobinaryformat.
EXIT
(Internal)
EXIT
Exitsasecondarycommandprocessor.
EXPAND
(External)
EXPAND[d:][path]filename[[d:][path]filename[...]]
Expandsacompressedfile.
FASTHELP
(External)
FASTHELP[command][command]/?
DisplaysalistofDOScommandswithabriefexplanationofeach.
FASTOPEN
(External)
FASTOPENd:[=n][/X]
Keepstrackofthelocationsoffilesforfastaccess.
FC
(External)

FC[/A][/C][/L][/Lbn][/N][/T][/W][number][d:][path]filename[d:][path]filename
or(forbinarycomparisons)
FC[/B][/number][d:][path]filename[d:][path]filename
Displaysthedifferencesbetweentwofilesorsetsoffiles.
FCBS
(Internal)
FCBS=(number)
UsedintheCONFIG.SYSfiletospecifythenumberoffile-controlblocksforfilesharing.
FDISK
(External)
FDISK[/status]
PreparesafixeddisktoacceptDOSfilesforstorage.
FILES
(Internal)
FILES=(number)
UsedintheCONFIG.Sysfiletospecifythemaximumnumberoffilesthatcanbeopenatthesametime.
FIND
(External)
FIND[/V][/C][/I][/N]string[d:][path]filename[...]
Findsandreportsthelocationofaspecificstringoftextcharactersinoneormorefiles.
FOR
(Internal)
FOR%%(variable)IN(set)DO(command)

or(forinteractiveprocessing)
FOR%(variable)IN(set)DO(command)
Performsrepeatedexecutionofcommands(forbothbatchprocessingandinteractiveprocessing).
FORMAT
(External)
FORMATd:[/1][/4][/8][/F:(size)][/N:(sectors)][/T:(tracks)][/B|/S][/C][/V:(label)][/Q][/U][/V]
FormatsadisktoacceptDOSfiles.
GOTO
(Internal)
GOTO(label)
Causesunconditionalbranchtothespecifiedlabel.
GRAFTABL
(External)
GRAFTABL[(codepage)]
GRAFTABL[status]
Loadsatableofcharacterdataintomemory(forusewithacolor/graphicsadapter).
GRAPHICS
(External)
GRAPHICS[printertype][profile][/B][/R][/LCD][/PB:(id)][/C][/F][/P(port)]
Providesawaytoprintcontentsofagraphicsscreendisplay.
HELP
(External)
HELP[command][/B][/G][/H][/NOHI]
DisplaysinformationaboutaDOScommand.

IF
(Internal)
IF[NOT]EXISTfilename(command)[parameters]
IF[NOT](string1)==(string2)(command)[parameters]
IF[NOT]ERRORLEVEL(number)(command)[parameters]
Allowsforconditionaloperationsinbatchprocessing.
INCLUDE
(Internal)
INCLUDE=blockname
UsedintheCONFIG.SYSfiletoallowyoutousethecommandsfromoneCONFIG.SYSblockwithinanother.
INSTALL
(Internal)
INSTALL=[d:][\path]filename[parameters]
UsedintheCONFIG.SYSfiletoloadmemory-residentprogramsintoconventionalmemory.
INTERLINK
(External)
INTERLINK[client[:]=[server][:]]
Connectstwocomputersviaparallelorserialportssothatthecomputerscansharedisksandprinterports.
INTERSVR
(External)
INTERSVR[d:][...][/X=d:][...][/LPT:[n|address]][/COM:[n|address]][/baud:rate][/B][/V]
INTERSVR/RCOPY
StartstheInterlinkserver.
JOIN
(External)

JOINd:[d:path]
JOINd:[/D]
Allowsaccesstothedirectorystructureandfilesofadrivethroughadirectoryonadifferentdrive.
KEYB
(External)
KEYB[xx][,][yyy][,][d:][path]filename[/E][/ID:(number)]
LoadsaprogramthatreplacesthesupportprogramforU.S.keyboards.
LABEL
(External)
LABEL[d:][volumelabel]
Createsorchangesordeletesavolumelabelforadisk.
LASTDRIVE
(Internal)
LASTDRIVE=(driveletter)
UsedintheCONFIG.SYSfiletosetthemaximumnumberofdrivesthatcanbeaccessed.
LOADFIX
(Internal)
LOADFIX[d:][path]filename[parameters]
Ensuresthataprogramisloadedabovethefirst64Kofconventionalmemory,andrunstheprogram.
LOADHIGH
(Internal)
LOADHIGH(LH)[d:][path]filename[parameters]
Loadsmemoryresidentapplicationintoreservedareaofmemory(between640K-1M).

MEM
(External)
MEM[/program|/debug|/classify|/free|/module(name)][/page]
Displaysamountofinstalledandavailablememory,includingextended,expanded,anduppermemory.
MEMMAKER
(External)
MEMMAKER[/B][/batch][/session][/swap:d][/T][/undo][/W:size1,size2]
StartstheMemMakerprogram,aprogramthatletsyouoptimizeyourcomputer'smemory.
MENUCOLOR
(Internal)
MENUCOLOR=textcolor,[background]
UsedintheCONFIG.SYSfiletosetthecolorsthatwillbeusedbyDOStodisplaytextonthescreen.
MENUDEFAULT
(Internal)
MENUDEFAULT=blockname,[timeout]

UsedintheCONFIG.SYSfiletosetthestartupconfigurationthatwillbeusedbyDOSifnokeyispressedwithinth
MENUITEM
(Internal)
MENUITEM=blockname,[menutext]

UsedintheCONFIG.SYSfiletocreateastart-upmenufromwhichyoucanselectagroupofCONFIG.SYScomm
MIRROR
(External)
MIRROR[d:]path[d:]path[...]
MIRROR[d1:][d2:][...][/T(drive)(files)][/partn][/U][/1]

Savesdiskstorageinformationthatcanbeusedtorecoveraccidentallyerasedfiles.
MKDIR
(MD)(Internal)
MKDIR(MD)[d:]path
Createsanewsubdirectory.

MODE
(External)
MODEn
MODELPT#[:][n][,][m][,][P][retry]
MODE[n],m[,T]
MODE(displaytype,linetotal)
MODECOMn[:]baud[,][parity][,][databits][,][stopbits][,][retry]
MODELPT#[:]=COMn[retry]
MODECON[RATE=(number)][DELAY=(number)]
MODE(device)CODEPAGEPREPARE=(codepage)[d:][path]filename
MODE(device)CODEPAGEPREPARE=(codepagelist)[d:][path]filename
MODE(device)CODEPAGESELECT=(codepage)
MODE(device)CODEPAGE[/STATUS]
MODE(device)CODEPAGEREFRESH
Setsmodeofoperationfordevicesorcommunications.
MORE
(External)
MORE<(filenameorcommand)
(name)|MORE
Sendsoutputtoconsole,onescreenatatime.

MOVE
(Internal)
MOVE[/Y|/-Y][d:][path]filename[,[d:][path]filename[...]]destination

Movesoneormorefilestothelocationyouspecify.Canalsobeusedtorenamedirectories.

MSAV
(External)
MSAV[d:][/S|/C][/R][/A][/L][/N][/P][/F][/video][/mouse]
MSAV/video
Scansyourcomputerforknownviruses.

MSBACKUP
(External)
MSBACKUP[setupfile][/BW|/LCD|/MDA]
Usedtobackuporrestoreoneormorefilesfromonedisktoanother.

MSCDEX
(External)
MSCDEX/D:driver[/D:driver2...][/E][/K][/S][/V][/L:letter][/M:number]
UsedtogainaccesstoCD-ROMdrives(newwithDOSVersion6).

MSD
(External)
MSD[/B][/I]
MSD[/I][/F[d:][path]filename[/P[d:][path]filename[/S[d:][path]filename
Providesdetailedtechnicalinformationaboutyourcomputer.

NLSFUNC
(External)

NLSFUNC[d:][path]filename
Usedtoloadafilewithcountry-specificinformation.

NUMLOCK
(Internal)
NUMLOCK=on|off
UsedintheCONFIG.SYSfiletospecifythestateoftheNumLockkey.

PATH
(Internal)
PATH;
PATH[d:]path[;][d:]path[...]
Setsordisplaysdirectoriesthatwillbesearchedforprogramsnotinthecurrentdirectory.

PAUSE
(Internal)
PAUSE[comment]
Suspendsexecutionofabatchfileuntilakeyispressed.

POWER
(External)
POWER[adv:max|reg|min]|std|off]

Usedtoturnpowermanagementonandoff,reportthestatusofpowermanagement,andsetlevelsofpowercons

PRINT
(External)

PRINT[/B:(buffersize)][/D:(device)][/M:(maxtick)][/Q:(value][/S:(timeslice)][/U:(busytick)][/C][/P][/T][d:][path][filen
Queuesandprintsdatafiles.

PROMPT
(Internal)
PROMPT[prompttext][options]
ChangestheDOScommandprompt.

RECOVER
(External)
RECOVER[d:][path]filename
RECOVERd:
Resolvessectorproblemsonafileoradisk.(BeginningwithDOSVersion6,RECOVERisnolongeravailable).

REM
(Internal)
REM[comment]
UsedinbatchfilesandintheCONFIG.SYSfiletoinsertremarks(thatwillnotbeactedon).

RENAME(REN)
(Internal)
RENAME(REN)[d:][path]filename[d:][path]filename
Changesthefilenameunderwhichafileisstored.

REPLACE
(External)

REPLACE[d:][path]filename[d:][path][/A][/P][/R][/S][/U][/W]
Replacesstoredfileswithfilesofthesamenamefromadifferentstoragelocation.

RESTORE
(External)
RESTOREd:[d:][path]filename[/P][/S][/B:mm-dd-yy][/A:mm-dd-yy][/E:hh:mm:ss][/L:hh:mm:ss][/M][/N][/D]
RestorestostandarddiskstorageformatfilespreviouslystoredusingtheBACKUPcommand.

RMDIR(RD)
(Internal)
RMDIR(RD)[d:]path
Removesasubdirectory.

SCANDISK
(External)
SCANDISK[d:[d:...]|/all][/checkonly|/autofix[/nosave]|/custom][/surface][/mono][/nosummay]
SCANDISKvolume-name[/checkonly|/autofix[/nosave]|/custom][/mono][/nosummary]
SCANDISK/fragment[d:][path]filename
SCANDISK/undo[undo-d:][/mono]

StartstheMicrosoftScanDiskprogramwhichisadiskanalysisandrepairtoolusedtocheckadriveforerrorsand

SELECT
(External)
SELECT[d:][d:][path][countrycode][keyboardcode]

Formatsadiskandinstallscountry-specificinformationandkeyboardcodes(startingwithDOSVersion6,thiscom

SET

(Internal)
SET(string1)=(string2)
Insertsstringsintothecommandenvironment.Thesetvaluescanbeusedlaterbyprograms.
SETVER
(External)
SETVER[d:]:path][filename(number)][/delete][/quiet]
DisplaystheversiontableandsetstheversionofDOSthatisreportedtoprograms.

SHARE
(External)
SHARE[/F:space][/L:locks]
Installssupportforfilesharingandfilelocking.

SHELL
(Internal)
SHELL=[d:][path]filename[parameters]
UsedintheCONFIG.SYSfiletospecifythecommandinterpreterthatDOSshoulduse.

SHIFT
(Internal)
SHIFT
Increasesnumberofreplaceableparameterstomorethanthestandardtenforuseinbatchfiles.

SORT
(External)

SORT[/R][/+n]<(filename)
SORT[/R][/+n]>(filename2)
Sortsinputandsendsittothescreenortoafile.

STACKS
(Internal)
STACKS=(number),(size)
UsedintheCONFIG.SYSfiletosetthenumberofstackframesandthesizeofeachstackframe.

SUBMENU
(Internal)
SUBMENU=blockname,[menutext]
UsedintheCONFIG.SYSfiletocreateamultilevelmenufromwhichyoucanselectstart-upoptions.

SUBST
(External)
SUBSTd:d:path
SUBSTd:/D
Substitutesavirtualdriveletterforapathdesignation.

SWITCHES
(Internal)
SWITCHES=[/K][/F][/N][/W]

UsedintheCONFIG.SYSfiletoconfigureDOSinaspecialway;forexample,totellDOStoemulatedifferenthard

SYS
(External)

SYS[source]d:
Transferstheoperatingsystemfilestoanotherdisk.

TIME
(Internal)
TIMEhh:mm[:ss][.cc][A|P]
Displayscurrenttimesettingofsystemclockandprovidesawayforyoutoresetthetime.

TREE
(External)
TREE[d:][path][/A][/F]
Displaysdirectorypathsand(optionally)filesineachsubdirectory.

TYPE
(Internal)
TYPE[d:][path]filename
Displaysthecontentsofafile.

UNDELETE
(External)
UNDELETE[d:][path][filename][/DT|/DS|/DOS]
UNDELETE[/list|/all|/purge[d:]|/status|/load|/U|/S[d:]|/Td:[-entries]]
RestoresfilesdeletedwiththeDELETEcommand.

UNFORMAT
(External)

UNFORMATd:[/J][/L][/test][/partn][/P][/U]
Usedtoundotheeffectsofformattingadisk.

VER
(Internal)
VER
DisplaystheDOSversionnumber.

VERIFY
(Internal)
VERIFYon|off
Turnsontheverifymode;theprogramchecksallcopyingoperationstoassurethatfilesarecopiedcorrectly.

VOL
(Internal)
VOL[d:]
Displaysadisk'svolumelabel.

VSAFE
(External)
VSAFE[/option[+|-]...][/NE][/NX][Ax|/Cx][/N][/D][/U]

VSAFEisamemory-residentprogramthatcontinuouslymonitorsyourcomputerforvirusesanddisplaysawarning

XCOPY
(External)

XCOPY[d:][path]filename[d:][path][filename][/A][/D:(date)][/E][/M][/P][/S][/V][/W][Y\-Y]
Copiesdirectories,subdirectories,andfiles.

Syntax Notes

Tobefunctional,eachDOScommandmustbeenteredinaparticularway:thiscommandentrystructureisknown

Forexample,youcandeterminetheitemsthatareoptional,bylookingforinformationthatisprintedinsidesquare
Command Syntax Elements
1. Command Name

TheDOScommandnameisthenameyouentertostarttheDOSprogram(afewoftheDOScommandscanbee
2. Space
Alwaysleaveaspaceafterthecommandname.
3. Drive Designation

Thedrivedesignation(abbreviatedinthisbookas"d:")isanoptionformanyDOScommands.However,somecom
4. A Colon

WhenreferringtoadriveinaDOScommand,youmustalwaysfollowthedrivedesignatorwithacolon(:)(thisish
5. Pathname

Apathname(path)referstothepathyouwantDOStofollowinordertoactontheDOScommand.Asdescribedin
6. Filename

Afilenameisthenameofafilestoredondisk.AsdescribedinChapter1,afilenamecanbeofeightorfewerletter
7. Filename Extension

Afilenameextensioncanfollowthefilenametofurtheridentifyit.Theextensionfollowsaperiodandcanbeofthre
8. Switches

Charactersshowninacommandsyntaxthatarerepresentedbyaletterornumberandprecededbyaforwardslas
9. Brackets

Itemsenclosedinsquarebracketsareoptional;inotherwords,thecommandwillworkinitsbasicformwithoutent
10. Ellipses
Ellipses(...)indicatethataniteminacommandsyntaxcanberepeatedasmanytimesasneeded.
11. Vertical Bar

Whenitemsareseparatedbyaverticalbar(|),itmeansthatyouenteroneoftheseparateditems.Forexample:O

DESCRIPTION
Defines functions that change display graphics, control cursor movement, and reassign keys.
CausesMS-DOStolookinotherdirectorieswheneditingafileorrunningacommand.
Displays,adds,andremovesarpinformationfromnetworkdevices.
Assignadrivelettertoanalternateletter.
Viewthefileassociations.
Scheduleatimetoexecutecommandsorprograms.
ListsconnectionsandaddressesseenbyWindowsATMcallmanager.
Displayandchangefileattributes.
Recoveryconsolecommandthatexecutesaseriesofcommandsinafile.
Recoveryconsolecommandthatallowsausertoview,modify,andrebuildtheboot.ini
Enable/disableCTRL+Cfeature.
ViewandmodifyfileACL's.
Callsabatchfilefromanotherbatchfile.
Changesdirectories.
Supplement the International keyboard and character set information.
Changesdirectories.
ChecktheharddiskdriverunningFATforerrors.
ChecktheharddiskdriverunningNTFSforerrors.
Specifyalistingofmultipleoptionswithinabatchfile.
Clearsthescreen.
Opensthecommandinterpreter.
EasilychangetheforegroundandbackgroundcoloroftheMS-DOSwindow.
Opensthecommandinterpreter.
Comparesfiles.
Compressesanduncompressfiles.
OpencontrolpaneliconsfromtheMS-DOSprompt.
ConvertFATtoNTFS.
Copyoneormorefilestoanalternatelocation.
Changethecomputersinput/outputdevices.
Vieworchangethesystemsdate.
Debugutilitytocreateassemblyprogramstomodifyhardwaresettings.
Re-arrangetheharddiskdrivetohelpwithloadingprograms.
Deletesoneormorefiles.
Recoveryconsolecommandthatdeletesafile.
Deletesoneormorefilesand/ordirectories.
Listthecontentsofoneormoredirectory.
RecoveryconsolecommandthatdisablesWindowssystemservicesordrivers.
Compareadiskwithanotherdisk.
Copythecontentsofonediskandplacethemonanotherdisk.
Commandtoviewandexecutecommandsthathavebeenruninthepast.
AGUItohelpwithearlyMS-DOSusers.
Enablesoverwriteoforiginaldevicedrivers.
Displaysmessagesandenablesanddisablesecho.
Viewandeditfiles.

Viewandeditfiles.
LoadextendedMemoryManager.
Recoveryconsolecommandtoenableadisableserviceordriver.
Stopsthelocalizationoftheenvironmentchangesenabledbythesetlocalcommand.
Erasefilesfromcomputer.
Exitfromthecommandinterpreter.
ExpandaMicrosoftWindowsfilebacktoit'soriginalformat.
ExtractfilesfromtheMicrosoftWindowscabinets.
DisplaysalistingofMS-DOScommandsandinformationaboutthem.
Comparefiles.
Utilityusedtocreatepartitionsontheharddiskdrive.
Searchfortextwithinafile.
Searchesforastringoftextwithinafile.
Writesanewbootsector.
Writesanewbootrecordtoadiskdrive.
Booleanusedinbatchfiles.
Commandtoeraseandprepareadiskdrive.
CommandtoconnectandoperateonaFTPserver.
Displaysormodifiesfiletypesusedinfileextensionassociations.
Movesabatchfiletoaspecificlabelorlocation.
Showextendedcharactersingraphicsmode.
Displayalistingofcommandsandbriefexplanation.
Allowsforbatchfilestoperformconditionalprocessing.
32-bitfilemanager.
Networkcommandtoviewnetworkadaptersettingsandassignedvalues.
Changelayoutofkeyboard.
Changethelabelofadiskdrive.
Loadadevicedriverintohighmemory.
Recoveryconsolecommandthatdisplaystheservicesanddrivers.
Loadaprogramabovethefirst64k.
Loadadevicedriverintohighmemory.
Locktheharddiskdrive.
Recoveryconsolecommandtolistinstallationsandenableadministratorlogin.
Displaysthedevicenameofadrive.
Commandtocreateanewdirectory.
Displaymemoryonsystem.
Commandtocreateanewdirectory.
Modifytheportordisplaysettings.
Displayonepageatatime.
Moveoneormorefilesfromonedirectorytoanotherdirectory.
EarlyMicrosoftVirusscanner.
Diagnosticsutility.
UtilityusedtoloadandprovideaccesstotheCD-ROM.
DisplaysprotocolstatisticsandcurrentTCP/IPconnectionsusingNBT
Update,fix,orviewthenetworkornetworksettings
ConfiguredynamicandstaticnetworkinformationfromMS-DOS.

DisplaytheTCP/IPnetworkprotocolstatisticsandinformation.
Loadcountryspecificinformation.
LookupanIPaddressofadomainorhostonanetwork.
Viewandmodifythecomputerspathlocation.
Viewandlocatelocationsofnetworklatency.
Commandusedinbatchfilestostoptheprocessingofacommand.
Test/sendinformationtoanothernetworkcomputerornetworkdevice.
Changestothedirectoryornetworkpathstoredbythepushdcommand.
Conserve power with computer portables.
Printsdatatoaprinterport.
ViewandchangetheMS-DOSprompt.
Storesadirectoryornetworkpathinmemorysoitcanbereturnedtoatanytime.
OpentheQBasic.
Removesanemptydirectory.
Renamesafileordirectory.
Renamesafileordirectory.
Removesanemptydirectory.
Viewandconfigurewindowsnetworkroutetables.
Enablesausertoexecuteaprogramonanothercomputer.
Runthescandiskutility.
Scanregistryandrecoverregistryfromerrors.
Change one variable or string to another.
Enableslocalenvironmentstobechangedwithoutaffectinganythingelse.
ChangeMS-DOSversiontotrickolderMS-DOSprograms.
Installs support for file sharing and locking capabilities.
Changes the position of replaceable parameters in a batch program.
ShutdownthecomputerfromtheMS-DOSprompt.
Createadiskcacheinconventionalmemoryorextendedmemory.
Sorts the input and displays the output to the screen.
StartaseparatewindowinWindowsfromtheMS-DOSprompt.
Substitute a folder on your computer for another drive letter.
RemoveaddfunctionsfromMS-DOS.
Transfersystemfilestodiskdrive.
Telnettoanothercomputer/devicefromtheprompt.
Viewormodifythesystemtime.
ChangethetitleoftheirMS-DOSwindow.
Visuallyviewanetworkpacketsrouteacrossanetwork.
Viewavisualtreeoftheharddiskdrive.
Displaythecontentsofafile.
Undeleteafilethathasbeendeleted.
Unformataharddiskdrive.
Unlockadiskdrive.
Displaytheversioninformation.
Enables or disables the feature to determine if files have been written properly.
Displays the volume information about the designated drive.
Copymultiplefiles,directories,and/ordrivesfromonelocationtoanother.

S Command Index

ormation about all current DOS commands

StheEasyWay
EverettMurdockPh.D.

ICKHEREforinformationaboutdownloadingthebookDOStheEasyWay.

ck on a command name for complete information about that command and examples of its use.

PEND[d:]path[;][d:]path[...]
PEND[/X:on|off][/path:on|off][/E]

playsorsetsthesearchpathfordatafiles.DOSwillsearchthespecifiedpath(s)ifthefileisnotfoundinthecurrentpath.

SIGNx=y[...]/sta

directsdiskdriverequeststoadifferentdrive.

TRIB[d:][path]filename[/S]
TRIB[+R|-R][+A|-A][+S|-S][+H|-H][d:][path]filename[/S]

sordisplaystheread-only,archive,system,andhiddenattributesofafileordirectory.

CKUPd:[path][filename]d:[/S][/M][/A][/F:(size)][/P][/D:date][/T:time][/L:[path]filename]

kesabackupcopyofoneormorefiles.(InDOSVersion6,thisprogramisstoredontheDOSsupplementaldisk.)

EAK=on|off

edfromtheDOSpromptorinabatchfileorintheCONFIG.SYSfiletoset(ordisplay)whetherornotDOSshouldcheckforaCtrl+Break

FFERS=(number),(read-aheadnumber)

edintheCONFIG.SYSfiletosetthenumberofdiskbuffers(number)thatwillbeavailableforuseduringdatainput.Alsousedtosetavalu

LL[d:][path]batchfilename[options]

lsanotherbatchfileandthenreturnstocurrentbatchfiletocontinue.

CP(codepage)

playsthecurrentcodepageorchangesthecodepagethatDOSwilluse.

DIR(CD)[d:]path

playsworking(current)directoryand/orchangestoadifferentdirectory.

KDSK[d:][path][filename][/F][/V]

ecksadiskandprovidesafileandmemorystatusreport.

OICE[/C[:]keys][/N][/S][/T[:]c,nn][text]

edtoprovideapromptsothatausercanmakeachoicewhileabatchprogramisrunning.

S(ClearScreen)

ars(erases)thescreen.

MMAND[d:][path][device][/P][/E:(size)][/MSG][/Y[/C(command)|/K(command)]

rtsanewversionoftheDOScommandprocessor(theprogramthatloadstheDOSInternalprograms).

MP[d:][path][filename][d:][path][filename][/A][/C][/D][/L][/N:(number)]

mparestwogroupsoffilestofindinformationthatdoesnotmatch.(SeeFCcommand).

PY[/Y|-Y][/A][/B][d:][path]filename[/A][/B][d:][path][filename][/V]

PY[/Y|-Y][/A][/B][d:][path]filename+[d:][path]filename[...][d:][path][filename][/V]

piesandappendsfiles.

UNTRY=countrycode,[codepage][,][d:][filename]

edintheCONFIG.SYSfiletotellDOStousecountry-specifictextconventionsduringprocessing.

angesthestandardI/O(Input/Output)devicetoanauxiliarydevice.

TEmm-dd-yy

playsand/orsetsthesystemdate.

LSPACE/automount=drives
LSPACE/chkdsk[/F][d:]
LSPACE/compressd:[/newdrive=host:][/reserve=size][/F]
LSPACE/created:[/newdrive=host:][/reserve=size][/size=size]
LSPACE/defragment[d:]]/F]
LSPACE/deleted:
LSPACE/doubleguard=0|1
LSPACE/formatd:
LSPACE[/info][d:]
LSPACE/list
LSPACE/mount[=nnn]host:[/newdrive=d:]
LSPACE/ratio[=ratio][d:][/all]
LSPACE/size[=size][/reserve=size]d:
LSPACE/uncompressd:
LSPACE/unmount[d:]

rogramavailablewithDOS6.0thatallowsyoutocompressinformationonadisk.

BUG[pathname][parameters]

MS-DOSutilityusedtotestandeditprograms.

FRAG[d:][/F][/S[:]order][/B][/skiphigh[/LCD|/BW|/GO][/H]
FRAG[d:][/V][/B][/skiphigh][/LCD]|/BW|/GO][/H]

timizesdiskperformancebyreorganizingthefilesonthedisk.

L(ERASE)[d:][path]filename[/P]

etes(erases)filesfromdisk.

LOLDOS[/B]

etesallfilesfrompreviousversionsofDOSaftera5.0or6.0installation.

LTREE[/Y][d:]path[d:]path[...]

etes(erases)adirectoryincludingallfilesandsubdirectoriesthatareinit.

VICE=(drivername)

edintheCONFIG.SYSfiletotellDOSwhichdevicedrivertoload.

VICEHIGH=(drivername)

eDEVICE,DEVICEHIGHisusedintheCONFIG.SYSfiletotellDOSwhichdevicedriversoftwaretousefordevices;however,thisoptioni

R[d:][path][filename][/A:(attributes)][/O:(order)][/B][/C][/CH][/L][/S][/P][/W]

playsdirectoryoffilesanddirectoriesstoredondisk.

SKCOMP[d:][d:][/1][/8]

mparesthecontentsoftwodiskettes.

SKCOPY[d:][d:][/1][/V][/M]

kesanexactcopyofadiskette.

S=[high|low],[umb|noumb]

edintheCONFIG.SYSfiletospecifythememorylocationforDOS.ItisusedtoloadDOSintotheuppermemoryareaandtospecifywheth

SKEY[reinstall][/bufsize=size][/macros][/history][/insert|/overstrike][macroname=[text]]

adstheDoskeyprogramintomemorywhichcanbeusedtorecallDOScommandssothatyoucaneditthem.

SSHELL[/B][/G:[resolution][n]]|[/T:[resolution][n]]

iatesthegraphicshellprogramusingthespecifiedscreenresolution.

IVPARM=/D:(number)[/C][/F:(formfactor)][/H:(number)][/I][/N][/S:(number)][/T:(tracks)]

edintheCONFIG.SYSfiletosetparametersforadiskdrive.

HO(message)

playsmessagesorturnsonoroffthedisplayofcommandsinabatchfile.

IT[d:][path]filename[/B][/G][/H][/NOHI]

rtstheMS-DOSeditor,atexteditorusedtocreateandeditASCIItextfiles.

M386[on|off|auto][w=on|off]

ablesordisablesEMM386expanded-memorysupportonacomputerwithan80386orhigherprocessor.

E2BIN[d:][path]filename[d:][path]filename

nverts.EXE(executable)filestobinaryformat.

tsasecondarycommandprocessor.

PAND[d:][path]filename[[d:][path]filename[...]]

pandsacompressedfile.

STHELP[command][command]/?

playsalistofDOScommandswithabriefexplanationofeach.

STOPENd:[=n][/X]

epstrackofthelocationsoffilesforfastaccess.

[/A][/C][/L][/Lbn][/N][/T][/W][number][d:][path]filename[d:][path]filename

forbinarycomparisons)
[/B][/number][d:][path]filename[d:][path]filename

playsthedifferencesbetweentwofilesorsetsoffiles.

BS=(number)

edintheCONFIG.SYSfiletospecifythenumberoffile-controlblocksforfilesharing.

ISK[/status]

eparesafixeddisktoacceptDOSfilesforstorage.

ES=(number)

edintheCONFIG.Sysfiletospecifythemaximumnumberoffilesthatcanbeopenatthesametime.

ND[/V][/C][/I][/N]string[d:][path]filename[...]

dsandreportsthelocationofaspecificstringoftextcharactersinoneormorefiles.

R%%(variable)IN(set)DO(command)

forinteractiveprocessing)
R%(variable)IN(set)DO(command)

rformsrepeatedexecutionofcommands(forbothbatchprocessingandinteractiveprocessing).

RMATd:[/1][/4][/8][/F:(size)][/N:(sectors)][/T:(tracks)][/B|/S][/C][/V:(label)][/Q][/U][/V]

matsadisktoacceptDOSfiles.

usesunconditionalbranchtothespecifiedlabel.

AFTABL[(codepage)]
AFTABL[status]

adsatableofcharacterdataintomemory(forusewithacolor/graphicsadapter).

APHICS[printertype][profile][/B][/R][/LCD][/PB:(id)][/C][/F][/P(port)]

ovidesawaytoprintcontentsofagraphicsscreendisplay.

LP[command][/B][/G][/H][/NOHI]

playsinformationaboutaDOScommand.

NOT]EXISTfilename(command)[parameters]
NOT](string1)==(string2)(command)[parameters]
NOT]ERRORLEVEL(number)(command)[parameters]

owsforconditionaloperationsinbatchprocessing.

CLUDE=blockname

edintheCONFIG.SYSfiletoallowyoutousethecommandsfromoneCONFIG.SYSblockwithinanother.

STALL=[d:][\path]filename[parameters]

edintheCONFIG.SYSfiletoloadmemory-residentprogramsintoconventionalmemory.

TERLINK[client[:]=[server][:]]

nnectstwocomputersviaparallelorserialportssothatthecomputerscansharedisksandprinterports.

TERSVR[d:][...][/X=d:][...][/LPT:[n|address]][/COM:[n|address]][/baud:rate][/B][/V]
TERSVR/RCOPY

rtstheInterlinkserver.

INd:[d:path]

owsaccesstothedirectorystructureandfilesofadrivethroughadirectoryonadifferentdrive.

YB[xx][,][yyy][,][d:][path]filename[/E][/ID:(number)]

adsaprogramthatreplacesthesupportprogramforU.S.keyboards.

BEL[d:][volumelabel]

eatesorchangesordeletesavolumelabelforadisk.

STDRIVE=(driveletter)

edintheCONFIG.SYSfiletosetthemaximumnumberofdrivesthatcanbeaccessed.

ADFIX[d:][path]filename[parameters]

suresthataprogramisloadedabovethefirst64Kofconventionalmemory,andrunstheprogram.

ADHIGH(LH)[d:][path]filename[parameters]

adsmemoryresidentapplicationintoreservedareaofmemory(between640K-1M).

M[/program|/debug|/classify|/free|/module(name)][/page]

playsamountofinstalledandavailablememory,includingextended,expanded,anduppermemory.

MMAKER[/B][/batch][/session][/swap:d][/T][/undo][/W:size1,size2]

rtstheMemMakerprogram,aprogramthatletsyouoptimizeyourcomputer'smemory.

NUCOLOR=textcolor,[background]

edintheCONFIG.SYSfiletosetthecolorsthatwillbeusedbyDOStodisplaytextonthescreen.

NUDEFAULT

NUDEFAULT=blockname,[timeout]

edintheCONFIG.SYSfiletosetthestartupconfigurationthatwillbeusedbyDOSifnokeyispressedwithinthespecifiedtimeoutperiod.

NUITEM=blockname,[menutext]

edintheCONFIG.SYSfiletocreateastart-upmenufromwhichyoucanselectagroupofCONFIG.SYScommandstobeprocessedupon

RROR[d:]path[d:]path[...]
RROR[d1:][d2:][...][/T(drive)(files)][/partn][/U][/1]

vesdiskstorageinformationthatcanbeusedtorecoveraccidentallyerasedfiles.

DIR(MD)[d:]path

eatesanewsubdirectory.

ODELPT#[:][n][,][m][,][P][retry]
ODE[n],m[,T]
ODE(displaytype,linetotal)
ODECOMn[:]baud[,][parity][,][databits][,][stopbits][,][retry]
ODELPT#[:]=COMn[retry]
ODECON[RATE=(number)][DELAY=(number)]
ODE(device)CODEPAGEPREPARE=(codepage)[d:][path]filename
ODE(device)CODEPAGEPREPARE=(codepagelist)[d:][path]filename
ODE(device)CODEPAGESELECT=(codepage)
ODE(device)CODEPAGE[/STATUS]
ODE(device)CODEPAGEREFRESH

smodeofoperationfordevicesorcommunications.

ORE<(filenameorcommand)

ndsoutputtoconsole,onescreenatatime.

OVE[/Y|/-Y][d:][path]filename[,[d:][path]filename[...]]destination

vesoneormorefilestothelocationyouspecify.Canalsobeusedtorenamedirectories.

AV[d:][/S|/C][/R][/A][/L][/N][/P][/F][/video][/mouse]

ansyourcomputerforknownviruses.

BACKUP[setupfile][/BW|/LCD|/MDA]

edtobackuporrestoreoneormorefilesfromonedisktoanother.

CDEX/D:driver[/D:driver2...][/E][/K][/S][/V][/L:letter][/M:number]

edtogainaccesstoCD-ROMdrives(newwithDOSVersion6).

D[/I][/F[d:][path]filename[/P[d:][path]filename[/S[d:][path]filename

ovidesdetailedtechnicalinformationaboutyourcomputer.

SFUNC[d:][path]filename

edtoloadafilewithcountry-specificinformation.

MLOCK=on|off

edintheCONFIG.SYSfiletospecifythestateoftheNumLockkey.

TH[d:]path[;][d:]path[...]

sordisplaysdirectoriesthatwillbesearchedforprogramsnotinthecurrentdirectory.

USE[comment]

spendsexecutionofabatchfileuntilakeyispressed.

WER[adv:max|reg|min]|std|off]

edtoturnpowermanagementonandoff,reportthestatusofpowermanagement,andsetlevelsofpowerconservation.

INT[/B:(buffersize)][/D:(device)][/M:(maxtick)][/Q:(value][/S:(timeslice)][/U:(busytick)][/C][/P][/T][d:][path][filename][...]

euesandprintsdatafiles.

OMPT[prompttext][options]

angestheDOScommandprompt.

COVER[d:][path]filename

solvessectorproblemsonafileoradisk.(BeginningwithDOSVersion6,RECOVERisnolongeravailable).

M[comment]

edinbatchfilesandintheCONFIG.SYSfiletoinsertremarks(thatwillnotbeactedon).

NAME(REN)

NAME(REN)[d:][path]filename[d:][path]filename

angesthefilenameunderwhichafileisstored.

PLACE[d:][path]filename[d:][path][/A][/P][/R][/S][/U][/W]

placesstoredfileswithfilesofthesamenamefromadifferentstoragelocation.

STOREd:[d:][path]filename[/P][/S][/B:mm-dd-yy][/A:mm-dd-yy][/E:hh:mm:ss][/L:hh:mm:ss][/M][/N][/D]

storestostandarddiskstorageformatfilespreviouslystoredusingtheBACKUPcommand.

MDIR(RD)[d:]path

movesasubdirectory.

ANDISK[d:[d:...]|/all][/checkonly|/autofix[/nosave]|/custom][/surface][/mono][/nosummay]
ANDISKvolume-name[/checkonly|/autofix[/nosave]|/custom][/mono][/nosummary]
ANDISK/fragment[d:][path]filename
ANDISK/undo[undo-d:][/mono]

rtstheMicrosoftScanDiskprogramwhichisadiskanalysisandrepairtoolusedtocheckadriveforerrorsandcorrectanyproblemsthatit

LECT[d:][d:][path][countrycode][keyboardcode]

matsadiskandinstallscountry-specificinformationandkeyboardcodes(startingwithDOSVersion6,thiscommandisnolongeravailable

T(string1)=(string2)

ertsstringsintothecommandenvironment.Thesetvaluescanbeusedlaterbyprograms.

TVER[d:]:path][filename(number)][/delete][/quiet]

playstheversiontableandsetstheversionofDOSthatisreportedtoprograms.

ARE[/F:space][/L:locks]

tallssupportforfilesharingandfilelocking.

ELL=[d:][path]filename[parameters]

edintheCONFIG.SYSfiletospecifythecommandinterpreterthatDOSshoulduse.

reasesnumberofreplaceableparameterstomorethanthestandardtenforuseinbatchfiles.

RT[/R][/+n]<(filename)
RT[/R][/+n]>(filename2)

rtsinputandsendsittothescreenortoafile.

ACKS=(number),(size)

edintheCONFIG.SYSfiletosetthenumberofstackframesandthesizeofeachstackframe.

BMENU=blockname,[menutext]

edintheCONFIG.SYSfiletocreateamultilevelmenufromwhichyoucanselectstart-upoptions.

BSTd:d:path

bstitutesavirtualdriveletterforapathdesignation.

WITCHES=[/K][/F][/N][/W]

edintheCONFIG.SYSfiletoconfigureDOSinaspecialway;forexample,totellDOStoemulatedifferenthardwareconfigurations.

S[source]d:

nsferstheoperatingsystemfilestoanotherdisk.

MEhh:mm[:ss][.cc][A|P]

playscurrenttimesettingofsystemclockandprovidesawayforyoutoresetthetime.

EE[d:][path][/A][/F]

playsdirectorypathsand(optionally)filesineachsubdirectory.

PE[d:][path]filename

playsthecontentsofafile.

DELETE[d:][path][filename][/DT|/DS|/DOS]
DELETE[/list|/all|/purge[d:]|/status|/load|/U|/S[d:]|/Td:[-entries]]

storesfilesdeletedwiththeDELETEcommand.

FORMATd:[/J][/L][/test][/partn][/P][/U]

edtoundotheeffectsofformattingadisk.

playstheDOSversionnumber.

nsontheverifymode;theprogramchecksallcopyingoperationstoassurethatfilesarecopiedcorrectly.

playsadisk'svolumelabel.

AFE[/option[+|-]...][/NE][/NX][Ax|/Cx][/N][/D][/U]

AFEisamemory-residentprogramthatcontinuouslymonitorsyourcomputerforvirusesanddisplaysawarningwhenitfindsone.

OPY[d:][path]filename[d:][path][filename][/A][/D:(date)][/E][/M][/P][/S][/V][/W][Y\-Y]
piesdirectories,subdirectories,andfiles.

befunctional,eachDOScommandmustbeenteredinaparticularway:thiscommandentrystructureisknownasthecommand's"syntax."

example,youcandeterminetheitemsthatareoptional,bylookingforinformationthatisprintedinsidesquarebrackets.Thenotation[d:],

mmand Syntax Elements

Command Name

eDOScommandnameisthenameyouentertostarttheDOSprogram(afewoftheDOScommandscanbeenteredusingshortcutname

waysleaveaspaceafterthecommandname.

Drive Designation

edrivedesignation(abbreviatedinthisbookas"d:")isanoptionformanyDOScommands.However,somecommandsarenotrelatedtod

enreferringtoadriveinaDOScommand,youmustalwaysfollowthedrivedesignatorwithacolon(:)(thisishowDOSrecognizesitasa

athname(path)referstothepathyouwantDOStofollowinordertoactontheDOScommand.AsdescribedinChapter3,itindicatesthep

lenameisthenameofafilestoredondisk.AsdescribedinChapter1,afilenamecanbeofeightorfewerlettersorotherlegalcharacters.

Filename Extension

lenameextensioncanfollowthefilenametofurtheridentifyit.Theextensionfollowsaperiodandcanbeofthreeorfewercharacters.Afile

aractersshowninacommandsyntaxthatarerepresentedbyaletterornumberandprecededbyaforwardslash(forexample,"/P")areco

msenclosedinsquarebracketsareoptional;inotherwords,thecommandwillworkinitsbasicformwithoutenteringtheinformationcontain

pses(...)indicatethataniteminacommandsyntaxcanberepeatedasmanytimesasneeded.
Vertical Bar

enitemsareseparatedbyaverticalbar(|),itmeansthatyouenteroneoftheseparateditems.Forexample:ON|OFFmeansthatyoucan

hecurrentpath.

shouldcheckforaCtrl+Breakkeycombination.

atainput.Alsousedtosetavalueforthenumberofsectorstobereadinadvance(read-ahead)duringdatainputoperations.

ordevices;however,thisoptionisusedtoinstallthedevicedriverintotheuppermemoryarea.

emoryareaandtospecifywhetherornottheuppermemoryblockswillbeused.

hinthespecifiedtimeoutperiod.

ommandstobeprocesseduponreboot.

conservation.

[filename][...]

andcorrectanyproblemsthatitfinds.

commandisnolongeravailable).

hardwareconfigurations.

rningwhenitfindsone.

ownasthecommand's"syntax."Thesyntax"notation"isawaytoreproducethecommandsyntaxinprint.

uarebrackets.Thenotation[d:],forexample,indicatesanoptionaldrivedesignation.Thecommandsyntax,ontheotherhand,ishowYOU

beenteredusingshortcutnames).TheDOScommandnameisalwaysenteredfirst.Inthisbook,thecommandisusuallyprintedinupperc

ecommandsarenotrelatedtodiskdrivesandthereforedonotrequireadrivedesignation.WheneveryouenteraDOScommandthatdea

sishowDOSrecognizesitasadrivedesignation).

edinChapter3,itindicatesthepathfromthecurrentdirectoryorsubdirectorytothefilesthataretobeactedupon.

lettersorotherlegalcharacters.

fthreeorfewercharacters.Afilenameextensionisnotrequired.

dslash(forexample,"/P")arecommandoptions(sometimesknownas"switches").Useoftheseoptionsactivatespecialoperationsaspart

utenteringtheinformationcontainedinsidethebrackets.

le:ON|OFFmeansthatyoucanentereitherONorOFF,butnotboth.

datainputoperations.

ntax,ontheotherhand,ishowYOUenterthecommandtomakeitwork.

ommandisusuallyprintedinuppercaseletters,butyoucanentercommandnamesaseitherlowercaseoruppercaseoramixofboth.

youenteraDOScommandthatdealswithdiskdrivesandyouarealreadyworkinginthedriveinquestion,youdonothavetoenterthedriv

actedupon.

sactivatespecialoperationsaspartofaDOScommand'sfunctions.

eoruppercaseoramixofboth.

on,youdonothavetoenterthedrivedesignator.Forexample,ifyouareworkingindriveA(whentheDOSpromptA>isshowingattheleft

DOSpromptA>isshowingattheleftsideofthescreen)andyouwanttousetheDIRcommandtodisplayadirectorylistingofthatsamedri

ayadirectorylistingofthatsamedrive,youdonothavetoenterthedrivedesignation.Ifyoudonotenteradrivedesignation,DOSalways

eradrivedesignation,DOSalwaysassumesyouarereferringtothedriveyouarecurrentlyworkingin(sometimescalledthe"default"drive

sometimescalledthe"default"drive).

In the following examples of DOS commands the


actual words
or letters
you type are inclosed in
Example
MS/DOS
Commands
brackets and highlighted in blue. DO NOT
include the brackets [ ] in your command.

Command Menu
TheTypeCommand
SettheSystemTime
CopyandRenameaFile
RenameaFile
CopyaFiletoAnotherDirectory
DeleteaFile
CopyaFiletoAnotherDrive
UndeleteaFile
CopyGroupstoAnotherDirectory
UndeleteProtection
CopyAllFilestoAnotherDrive
DisplayaVolumeLable
CheckSystemMemory
ChangeaVolumeLabel
SettheDOSPath
CheckDiskSpace
FromChecktheDOSVersion
time to time you will have
a requirement to
TheDirectoryCommand
look atSettheSystemDate
the contents of a text file. Normally you

would think the only way to do this is to open a


While
this method
is valid,and
there
is a
way
to do
wordType
processor
program
view
the
contents
The
Command
the
same
from
the
MS-DOS
command
level.
The
by opening the file.
TYPE command tells DOS to display the
contents of a text file.
The steps taken below will display the contents
of the Autoexec.bat file.

The Basic Command


1. Type
[CD\]
and press the [Enter] Key - This
Looks
Like
This
step moves you to the root directory. (see
Change Directory Command)

2. Then Type [Type] - This is the command


3.
Press the [Space Bar] once - Pressing the
word.
space bar once inserts a space between the
4.
Type [AUTOEXEC.BAT]
AUTOEXEC.BAT
is
command
and the file that- you
want to display.
the name of the file you want to display the
You
will seeof.
the contents of the file Autoexec.bat
contents
displayed
on
screen.
may have
different
5. Press thethe
[Enter
key](You
- Pressing
Enter
Note:
Some
files
(especially
program
files)
commands
in your
AUTOEXEC.BAT file.) The
confirms the
command.
contain
characters
that
DOS cannot
display.ofYou
TYPE command
only
displays
the contents
a
may
hearcan
beeps
strange characters
file. You
not and
edit see
the file.
onscreen if you display this type of file. Press
CtrlC to stop the display.
The copy command can be used to copy one file
to another file with a different name. (Make a
backup copy of the file) The steps taken below
will
copy
a file
and rename
the- copy
to Command)
another
Copy
and
Rename
the File
(Internal
name.
The Basic Command Looks Like This

1. Type[CD\] and press the [Enter] Key - This


step moves you to the root directory. (see
2.
Then Type
[Copy]
- This is the command
Change
Directory
Command)
word. The COPY command tells DOS to make a
3.
Press
the[Space
Bar] once. - Pressing the
copy
of the
file.
4.
Type
[AUTOEXEC.BAT]
- AUTOEXEC.BAT
space bar once inserts a space
between theis
the
name of
thethe
filefile
you
want
copytoand
command
and
that
youtowant
copy.
6.
Type [AUTOEXEC.old] - AUTOEXEC.OLD is
rename.
7.
[Enter
- Pressing
Enter
thePress
namethe
you
want key]
to assign
the copy
of the
confirms
the
command.
You
will
see
the
file.
This
command
makes
a
copy
of
the
file
5. Press the[Space Bar] once
message
1
file(s)
copied
appear
on
the
screen.
AUTOEXEC.BAT and names the file
8.
Type
[DIR
AUTOEXEC.*]
press
[Enter].
Now
you
have
two versionsand
of the
same
file.
AUTOEXEC.OLD.
This
command
tells
DOS
to
display
all
files
Each has a different name. To confirm that a
with
name
AUTOEXEC
with
any
copythe
hasfile
been
made
follow theand
next
step.
extension. You should see both
AUTOEXEC.BAT and AUTOEXEC.OLD.

The copy command is also used to copy files


from one directory to another. The steps taken
below a
will
copy
file to another
directory area
Copy
File
ToaAnother
Directory
on the hard disk.
1. Type
and press
theLike
[Enter]
The
Basic[CD\]
Command
Looks
ThisKey - This
step moves you to the root directory. (see
2.
Then Type
[Copy]-Command)
This is the command word.
Change
Directory
The COPY command tells DOS to make a copy
3.
the [Space Bar] once - Pressing the
of Press
the file.
space bar once inserts a space between the
command and the file that you want to copy.
4. Type [Autoexec.old] - AUTOEXEC.old is the
7.
Press
the file
[Enter
- Pressing
name
of the
youkey]
want
to copy. Enter
confirms the command. You will see the
message
1 file(s)
copied
appear
ontells
the screen.
6.
- Typing
C:\DATA
DOS to
5. Type
Press[C:\DATA]
the
[Space
Bar] once
Now
versions
of the
same The
file:
placeyou
the have
copy two
in the
directory
C:\DATA.
one
in
the
[ROOT]
directory
and
one
in
the
file will have the same name.
[DATA] directory. Both files have the same
name.
The copy command is also used to copy a group
of files from one directory to another. The steps
taken below
will of
copy
a group
of batchDirectory
(Bat) files
Copy
A Group
Files
To Another
to another directory area on the hard disk.
The Basic Command Looks Like This
This
step
moves
to the [Enter]
root directory.
(see
1. Type
[CD\]
andyou
press
Key
Change Directory Command)
2. Then Type [Copy]

This is the command word. The COPY


The
*.bat istells
the DOS
grouptoofmake
files ayou
want
to copy
command
copy
of the
file.
to
another
directory.
notice
we
are
using
on of
Pressing the space bar once inserts a space
the
wild cards
we spoke
of before.
between
the [Space
command
the file By
thatusing
you
3. Press
the
Bar]and
once
the
Asterix
we
are
saying
search
for
any
want to copy.
combination of letters before the period and
include
them if the three letters after the period
4. Type [*.bat]
are [bat].
Typing C:\DATA tells DOS to place the files in
the
directory
C:\DATA.
Beonce
sure to type a
5. Press
the [Space
Bar]
directory name. If the directory does not exist
or
is typed
incorrectly, DOS adds all the files
6. Type
[C:\DATA]
Note:
Use these
same
steps
toanother
copy a group
Pressing
Enter
confirms
the
command.
together
and
places
them
in
file.Youof
files
another
drive and directory.
To do
so,
willtosee
the message(#)
file(s) copied
appear
type
the
new
drive
name
instead
of
C:\data.
If
on
screen.
The
(#)
indicates
the
actual
7. Press the [Enter key
you
leave
off
the
file
name,
DOS
uses
the
same
number of files copied.
name for the files copied. As an example the
command might look like this:

The copy command is also used to copy all files


from one directory to another drive. The steps
taken below will copy all files in the data
directory
the to
hard
disk to another
Copy
All on
Files
a Different
Drivedrive called
A: Insert a formatted disk in drive A.
1. From the Root directory type [CD\batch] and
press
theCommand
[Enter] Key
This Like
step This
moves you to
The
Basic
Looks
the batch Sub-directory. (see Change Directory
2. Then Type [Copy] - This is the command
Command)
word. The COPY command tells DOS to make a
3.
Press
copy
of athe
file.[Space Bar] once - Pressing the
space bar once inserts a space between the
command and the file that you want to copy.
4. Type [*.*] - The *.* is used to specify all files
7.
the [Enter key] - Pressing Enter
in Press
the directory.
confirms the command. You will see the
message
(#) [Space
file(s) copied
appear on the
5. Press the
Bar] once.
screen.
The
(#)
indicates
the
actual
number
of
6. Type [A:] - Typing A: tells DOS
to copy
all the
files copied.
Now youC:\batch
have two
of
in the directory
to versions
the A: drive.
each file: one in the original directory (batch)
and one on (drive A.)
To verify the files have been copied:
9.
andpress
pressthe
the[Enter]
keyThis
- This
8. Type [DIR]
[A:] and
[Enter] key.
step
step
displays
directory
listing
makes
drive A:a the
current
drive.of the contents
of the disk in drive A: so that you can verify
that the copies were made.

Lets assume that you want to change the name


of the Autoexec.old file in the C:\data directory to
a name such
as (autoexec.cpy). You would use
Rename
A File
the RENAME command as described below.
1. Type
data]and
press
theThis
[Enter] Key The
Basic[CD\
Command
Looks
Like
This step moves you to the data Sub-directory.
2.
Then
Type Directory
[Ren] - This
is the command
(see
Change
Command)
word. The Rename command tells DOS to
3.
Pressathe
Bar]once - Pressing the
rename
file[Space
or directory.
space bar once inserts a space between the
command and the file that you want to copy.
4. Type [Autoexec.old] - Autoexec.old id the
name of the file you want to rename.
5. Press the [Space Bar] once.
6. Type [Autoexec.cpy] - Autoexec.cpy is the
7.
Press
thefor
[Enter
key]Pressing Enter
new
name
the file
autoexec.old.
confirms the command. The name
autoexec.old is now changed to autoexec.cpy.

Lets assume that you want to delete the


autoexec.cpy file from the C:\data directory You
would use
the Delete
Delete
a single
File command as described
below.
1. Type
- This is
the command
The
Basic[Del]
Command
Looks
Like This word. The
Note:
In earlier tells
versions
DOS
(before
DEL command
DOSof
you
want
to delete a
Version
4.0) you could spell out the comand
file.
[Delete]
2. Press the [Space Bar] once
4.
the [Enter key]--Autoexec.cpy
Pressing Enter
3. Press
Type [Autoexec.cpy]
is the
confirms
thefile
command.
name
name of the
you wantThe
to delete.
5.
Type [DIR] and
press
[Enter].
This
autoexec.cpy
is now
deleted
from
thestep
C:\data
displays
a
directory
listing
of
the
subdirectory
sub-directory. To verify,
C:\data so that you can verify that the file has
been deleted.
6. Type the command Delete *.*The wild cards
7.
the
[Enter]
keyused
here
(*.*)
specify
allPressing
files. Be Enter
careful with
ToPress
delete
all
files
in a
Subdirectory:
confirms
the command.
You up
willdeleting
see the file you
this command,
you can end
message
All files in directory will be deleted!
will need later.
If Are
for some
reason
youAnswer
accidentally
the
you sure (Y/N)?
yes bydelete
pressing
wrong
file
or
directory,
don't
panic.
There
is
the [Y] key if you want to delete all files.
something you can do to retrieve your files. With
MS-DOS versions 5, 6, and 6.2 an Undelete
command is included. When files are deleted on
a floppy or hard disk only the first letter of the
name is removed.
the file isCommand)
still on the disk until
Undelete
A File (External
it is written over by another file.

1. From
root directory type [CD\ data] and
The
Basicthe
Command
pressLike
the This
[Enter] Key - This step moves you to
Looks
the data Sub-directory. (see Change Directory
2.
Type [UNDELETE] and press the [Enter] key.
Command)
If you are using MS-DOS version 6.0 or greater,
you will see a screen similar to the following:
UNDELETE - Delete
Copyright
1987-1993
Protection (C)
Facility
Central Point Software Inc.
All Rights Reserved
Directory: C:\data
File Specification: *.*
Deletion
tracking
file not
Delete sentry
not found
MS-DOS directories contain
found
Of
[#] Files May
[#} Those
deletedFiles
files:
Using
the MS-DOS
Be Recovered
Directory Method:
?utoexec.cpy 2100 11-13-95
3. The...A
blue
line shows
the first deleted file that
11:46a
Undelete
(Y/N)?
MS-DOS
found.
The
file
[#] = Number of Files name, extension, size,
date, and time are listed. The first character of
the file name is replaced with a question mark.
4. Press the [Enter] Key - The next line will
CAUTION: Once you delete a file from your
appear on the screen. It will say
disk,
you
may
bean
able
retrieve
it. the
Although
5.
At this
point
type
[a] and
press
Please
type
thenot
First
Character
of the
file[enter]
?
the
UNDELETE
command
can
recover
key.
- your file
the
utoexec.cpy
: will be undeleted. Press deleted
files,
sotime
with
ifof
nothe
other
Note:
Ifcan
you
don't
know
the first
letter
[esc] it
key
atdo
any
tocertainty
stop
theonly
undelete
files
have been
or changed
thewhat
disk.
file,
assign
any created
letter. Then
after youon
see
program.
If
you
delete
a file that command
you want to
the
fileaccidentally
contains, use
the RENAME
to
keep,
stop
what
you
are
doing
and
immediately
rename the file.
use the UNDELETE command to retrieve the
file.

The UNDELETE
Command
the file from
MSDOS
provides
levelsmoves
of protection
MS-DOS
Undeletethree
Protection
its
current
location
to
the
SENTRY
directory
Deleteaccidental
Sentry - Provides
the highest
level of
against
file deletion
Delete
Tracker
The
next
level
of
protection
without
changing
record
of theafile's
protection.
Delete the
Sentry
requires
small is
Delete
which
requires
the (FAT).
same If you
location
in memory
the file
allocation
table
amountTracker,
of
and
disk space.
amount
of
memory
as
Delete
Sentry,
butback
undelete the file, MSDOS moves the file
minimal
disk
space.
It
uses
a
hidden
file named
to its original location.
When
you
delete
a
file,
MSDOS
changes
the
PCTRACKER.DEL to record the location of
Standard
The
lowest
level
of
protection,
You
can
recover
the
deleted
file
provided
that
file
allocation
deleted
files. table (FAT) to indicate that the
standard,
requires
neither
memory
nor
disk
another
hasfile
notisbeen
in for
thatanother
location file
of the
now placed
available
space,
but
still
allows
you
to
recover
deleted
location.
If
another
file
has
been
placed
there,
file.
files,
provided
that
their
location
on
the
disk
you may be able to partially recover
deleted
has
file. not been taken by other files. The standard
level of protection is automatically available
when you switch on your computer.

Of the three levels of guarding against


accidental file deletion, it provides the lowest
level of protection. However, it does not
require you to load a memoryresident program.
It also has the advantage of requiring neither
If
the directory
was
an immediate
subdirectory
UNDELETE
restore
a directory
that has
memory
norcannot
disk
space.
of
theremoved,
root directory,
mayretrieve
be ableatofile if
been
and ityou
cannot
retrieve
directory
its filesthat
if you
first
you
havethe
removed
theand
directory
contained
CAUTION:
use
the UNFORMAT command to restore the
the file.
Usually,
can
restore only
directoryUNFORMAT
and then use
UNDELETE
to retrieve
immediate
the files. sub-directories of the root directory.
However,
you use
UNFORMAT
to recover
You must when
use caution
because
you can
lose
an
accidentally
formatted
disk,
UNFORMAT
data if you use UNFORMAT incorrectly.
recovers all rootlevel files and subdirectory
names.

Therearetimeswhenyoumightneedtoknowwhat
Display
a Volume Label
thevolumelabelisonthediskyouareworkingon.

TheBasicCommandLooksLikeThis
1.Type[VOL].VOListhevolumecommand.
Volumeisanothernamefordrive.
2. Press the [ Enter.] key.PressingEnter
(whichisthevolumename)assignedtothedisk.
confirmsthecommand.Youseethevolumelabel
Youalsoseethevolumeserialnumber.

2.Pressthe[Enter]key.PressingEnterconfirms
1.Fromtherootdirectorytype[LABEL].LABELis
Change
The Volume Label

thecommand.Youseethevolumelabel(whichis
thelabelcommand.Youusethiscommandto
thename)currentlyassignedtothediskandthe
changethevolumelabelforthedisk.
volumeserialnumber.Youalsoseetheprompt
Volumelabel(11characters,ENTERfornone)?
3.Type[newname].where[newname]isthenew
volumelabelyouwanttouse.
4.Pressthe[Enter]key.PressingEnterconfirms
5.Type[VOL]andpress[Enter]key.Thisstep
thenewvolumelabel.
verifiesthatthevolumelabelhasbeenchanged.
Youseethevolumelabellistedas[newname.]

1. TypeTHE
[VER].VERistheversioncommand.You
CHECK
DOS VERSION
usethiscommandtodisplaythecurrentDOS
version.

2. Press [Enter].PressingEnterconfirmsthe
command.YouseethecurrentDOSversion
number.TheAfterscreenshowsthecurrent
versionasMSDOSVersion6.20.Yourversionwill
bedifferentfromtheonethatappearsintheAfter
screenifyouuseadifferentDOSversion.

1. Type DISK
[CHKDSK].CHKDSKisthecheckdisk
CHECK
SPACE AND MEMORY

2.
Press [Enter].PressingEnterconfirmsthe
command.Youusethiscommandtodisplaysome
command.DOSchecksthediskanddisplays
basicinformationaboutthedisk.
informationinthreesections.Thefirstsection
displaysthefollowinginformation:
totaldiskspace(inbytes)
numberofhiddenfiles(andnumberofbytes)
numberofdirectories(andnumberofbytes)
numberofuserfiles(andnumberofbytes)
numberofbadsectorsifany(inbytes)
Rememberthatabout1millionbytesequalsone
numberofbytesavailableondisk
megabyte(M).Soifthedisplayshows1998848,
thatnumberwouldequalabout2M.
Themiddlesectiondisplaysinformationabouthow
spaceisallocated(assigned).
Thelastsectiondisplaysthefollowinginformation
Rememberthatroughly1thousandbytesequals
aboutmemory:totalbytesmemorytotalbytesfree.
onekilobyte(K).Soifthedisplayshows655360,
thatnumberwouldequalabout640K.

SET THE DATE

2.
[Enter].PressingEnterconfirmsthe
1. Press
Type [DATE].DATEisthecommandthatyou
command.YouseethepromptCurrent
date is,
usetosetthedate.
followedbythecurrentdate.Youalsoseethe
promptEnter new date (mmddyy):
3.Type[090494].Thisisthenewdateyouwantto
enter.
4. Press [Enter].PressingEnterconfirmsthenew
date.

SET THE TIME

2.
[Enter].PressingEnterconfirmsthe
1. Press
Type [TIME].TIMEisthecommandthatyou
command.YouseethepromptCurrent
time is,
usetosetanddisplaythetime.
followedbythecurrenttime.Youalsoseethe
prompt Enter new time:
3. Type [16:00:00].Thisisthenewtimeyouwant
toset.

4. Press [Enter].PressingEnterconfirmsthenew
time.

1. Type [PATH].PATHisthecommandthatyou
usetotellDOSwhichdirectoriesitshouldsearch
tofindprograms.Ifadirectoryislistedinthe
SET
THE PATH
PATH,youdon'thavetochangetothatdirectoryto
2.
Press the [space bar] once.Pressingthe
useacommandorstartaprogram.
3.Type[C:\DOS].DOSisthedirectorythat
spacebaronceinsertsaspacebetweenthe
containsalltheDOSprogramfiles.YourDOS
commandandthepathstatement.
5.
Type [PATH] and press [Enter].Thisstep
directorymightbenameddifferently.Ifso,type
displaysthenewpath.Noticethatifyousetthe
thatdirectoryname.
paththisway,thenewpathoverridesthepathin
4. Press [Enter].PressingEnterconfirmsthe
theAUTOEXEC.BATfile.Whenyourestartthe
path.
Note:
Toincludemorethanonedirectoryinthe
computer,however,theAUTOEXEC.BATfile
path,separatethedirectoriesbyasemicolonfor
overridesthepath.
example,C:\DOS;C:\WORD.Don'tincludea
spacebetweendirectorynames.

CHECK MEMORY INFORMATION

2.
[Enter].Thisstepexecutesthe
1. Press
Type [MEM].MEMisthecommandtocheck
Differenttypesofmemoryarereported:
command.Onscreenyouseethetotalamountof
memoryinformation.
conventional,upper,adapterRAM/ROM,
memoryyourcomputerhas,theamountthatis
extended,andexpanded.Thisinformationmight
used,andtheamountthatisfree.
comeinhandyifyouarecallingforsupportorifa
programrequiresacertainamountofmemory.

TheCommand"DIR"isthedirectorycommand.It
tellsDOStolistallthefilesinthecurrentdirectory.
Inthisexample,thecurrentdirectoryistheroot(or
maindirectory).TheBasicCommandLooksLike
TheDIRCommand
This
2.PressEnter.PressingEnterconfirmsthe
command.Youwillseealistofthefilesand
directoriesintherootdirectory.(Yourlistwillvary,
dependingonthefilesanddirectoriesyouhave
Tousethedirectorycommand:
created.Youmaynotbeabletoseeallofthe
directoriesonyourscreenatthesametime.)
1.TypeDIR-AtTheC:/>Prompt-type[DIR].
Noticethatthefollowinginformationappearsonscreen:

DIR

Filename-Therootofthefilename(uptoeight
characters)appearsfirst.
Extension-Theextensionislistedinthesecond
column.

FileSize-Thenextcolumnliststhesizeofthe
file.Thesizeismeasuredinbytes.Onebyte
equalsaboutonecharacter.Iftheentryisa
directory,nothingislisted.
Directory-Iftheentryisadirectory,yousee
inthenextcolumn.
Date-Thenextcolumndisplaysthedatewhen
thefilewascreatedorlastmodified.
Note:Thetwolinesattheendofthedirectory
Time-Thefinalcolumndisplaysthetimewhen
listingdisplaythenumberoffiles,bytestaken,and
thefilewascreatedormodified.
bytesfree(diskspaceremaining).TheDOS
promptappearsatthebottomofthelistingsothat
youcantypethenextcommand.

MS/DOS was originally used by the first IBM PC. Over the years, it evolved into the current
DOS
and7 BIOS
controlled
the entire95/98.
PC. ItFor
resided
RAM MS/DOS
memory,was
along
the various
version
packaged
with Windows
manyinyears
thewith
primary
operating
MS-DOS
System
Basics
device
drivers.
DOS
and
BIOS
operate
hand-in-hand
in
controlling
the
PC.
In
this
discussion,
I
system for Intel based microprocessors.
When
you
first
turn
on
the
computer
(called
"booting"
the
computer),
MS-DOS
is
loaded
or
will try to keep the discussion at the newest or highest version of DOS (MS-DOS 6.22) with
started.
After
this boot up you usually see a blank screen with a small prompt (usually "C:\>").
which I am
familiar.
To people who have not used computers before, this prompt can be intimidating--it offers no
The
is What's
a Disk Operating
System
(DOS) is in control your computer. This
clue answer
on whatoftocourse
do next.
behind that
blank screen?
operating system provides a way to communicate with your computer. It also controls the
organization of files and programs on your hard and floppy disks.
In this section we will explore disk organization and some of the basic commands used to
To
keep track of
thethe
files,
operating
systems
such as MS-DOS, UNIX, and OS-2 require that
communicate
with
MS/DOS
operating
system.
files be organized into directories. While each of these systems required directories, the
information
recorded in each file entry is not the same. In this chapter we will discuss only the
Hard
Disk Organization
When
you
copy
or create
a file or install a program on the hard disk in a MS-DOS system, a File
way MS-DOS creates
file entries.
Allocation Table (FAT) is created on the hard disk. This FAT contains a listing of what is stored
on your disk. In the directory entry for each file, DOS records:
The file name.
The disk location (sector number).
The file size in bytes The date the file was last changed.
The time the file was last changed.

Directory Organization

Think about how you store letters in your office. In your office, you may have a filing cabinet.
In that filing cabinet, you probably have folders that pertain to different projects, employees,
Within
each folder
you have
letters, diagrams,
that you want to save.
organizations,
or some
otherarticles,
grouping--maybe
logical, reports--anything
maybe not.
With
Microsoft's
DOS,carries
a disk over
is like
filing cabinet.
Withinand
thatWindows
disk, you95/98
haveDisk
directories
or
This storage
method
toaMicrosoft's
MS-DOS
Operating
areas
set
aside
for
certain
files
such
as
memos,
articles,
or
diagrams.
The
same
type
items
Systems (DOS).
that you store in a folder are stored in electronic form in a file. That file is then stored in a
directory.

The
directory
is called
the root directory. All other directories are branches of this
Rootmain
Directory
and
the Path
directory, much like the roots of a tree. Directories can contain files, programs, or other
directories. The root directory is designated by a backslash (\).
To get to a particular file, you must trace the path from the root directory to the directory that
the file is located in. The path is the list of directories, starting with the root.
Each directory name is separated by a backslash (\). For example, the path [C:>\wp\reports]
gives you access to the directories as follows:
Start at drive C:\
Go from the root directory (\) to the [ WP] directory
Go from the [WP] directory to the [REPORTS] directory.
When we go to a directory it is the same as opening a folder in a file drawer.

Note: The paths for each of these directories would look like the following:
C:\ ----------------------------- Root Directory
C:\dos\ ----------------------- DOS subdirectory (1 level)
C:\Lotus\ --------------------- Lotus Subdirectory (1 Level)
C:\wp\ ------------------------- Word Perfect Subdirectory (1 level)
C:\wp\Report ---------------- Report Subdirectory (2 levels)
Microsoft's Disk Operating Systems identify each drive (including the hard disk) by a letter. For
example
the first diskette drive on any system is always drive [A:] and the second is always
Drive
Identification
drive [B:], etc. On some systems drive "A" is a 3-1/2 inch floppy drive. On other systems it can
be a 5-1/4 floppy drive.
The first logical or physical hard disk is always identified as [C:].
To specify the disk drive in a path statement you always give the drive letter followed by a
colon.
Examples: For each hard disk or Floppy disk, the top level directory is always called the
[ROOT] directory.
Sub-directories - Since one directory can contain entries for other directories, the
subordinate directories can be referred to as subdirectories.
These subdirectories are just like any other directory; they're just subordinate to a higherlevel directory.
As a result, subdirectories can also be referred to as directories.
This is the same as a letter in a file is a subordinate to the higher level file folder

In earlier versions
of MS/DOS,
when the command prompt was displayed in its standard form,
Managing
Directories
and Files
(C:\>), it told you what the default drive is, but but not the current directory. Modern versions of
MS/DOS shipped with Windows 95/98 will indicate both the drive and directory you are in.
If you are working with an older version of MS/DOS and want to change the form of the prompt
so it does tell you what the current directory is, use the PROMPT command as follows:
After the command is executed, the prompt is changed to show the current directory for the
drive you are logged into. If you are at the root directory of the C: drive your prompt would look
like this:

C:\>

Now if you changed the current directory to the DOS directory, the prompt would look like this:

C:\DOS>

The enhanced form of the prompt stays in effect until you turn your PC off. A prompt that tells
the current directory makes it easier to use the other DOS commands.
You should always set your prompt to this form.
You don't have to do this each time you start your PC. Instead, you can put a PROMPT
command in your autoexec.bat file.

File Names

Whenever you save a new file on a hard disk or a diskette, whether you use DOS or an
application program, you need to be able to create a valid file name.
A file name is separated into two parts that are separated by a period. The part that comes
The
MS/DOS
system
uses the The
8.3 file
convention.
Each file
must
have athe
unique
or
before
the period
is required.
partnaming
after the
period is optional
and
is called
extension.
different name. An entire file name is made up of the file name (up to eight characters) and the
extension (optional three characters).
The file name and extension are separated by a period. You cannot use these characters in a
file name:

As
andFile
example:
[Report.doc] is a valid file name. [Report] is the file name, and [doc] is the
Valid
Names:
extension. The file name should tell you what the file contains; the extension often tells you
the type of file.
Some programs such as Lotus Freelance and Lotus 123, assign an extension automatically. As
an example:

Invalid File Names:

[MY NOTES] is not a valid file name because a file name cannot contain spaces.(except in
If
you want
to include a space in a file name, however, you can use the underline character
Windows
95/98)
instead [MY_NOTES]. [Basicdosclass.DOC] also is not a valid file name because it contains
too many characters.

Wild Cards
When you want to work with a group of files, you can use wild cards. There are two
types of wild cards: an asterisk and a question mark.
The Asterisk

An asterisk wild card [*] matches any characters. The most common use of this wild card is
[*.*]. You might hear other computer users describe this wild card as star-dot-star.
This file spec matches all files; that is, the file can have any root name and any extension. (A
file spec is a combination of the path, file name, and extension.)

The file spec *.TAT specifies files with any root name (*.) and the extension TAT. The following
files would be included in this group:

The following files would not be included (because they have a different extension):

wildQuestion
card [?] matches
The
mark any single character. For instance, the file spec [?SALES.DOC]

includes all files that start with any character; the remaining letters must be [SALES], and the
file must have the extension [DOC]. The following files would be included in this group:

The following files would not be included:

Using Wild Cards -You can use wild cards in different combinations to control which files
are included in a group. Suppose, for example, that you are writing a book that has eight
chapters.

The file for each chapter is named [CHAP], followed by the chapter number, a
period, and the file extension [DOC].
When you want to copy all the files [CHAP1.DOC] through [CHAP8.DOC] , you
can use a file spec such as:

This file spec uses the [?] wild card and tells DOS to include every file named [CHAP] that is
Remember
? wildand
card
represents
one alphabetical character. If, however, your
followed bythat
oneeach
character
has
a DOC extension.
book is 15 chapters long, and the files are named CHAP through CHAP15.DOC, you need to
use a different wild card called the asterisk.

To copy all the files for this book, you can use a file spec such as: CHAP*.DOC

This file spec tells DOS to include every file named CHAP, followed by any number of
characters, with a DOC extension. Remember that the (*) wild card represents any number of
characters.

Special Files
Command.Com
To process
commands,
you must
havefor
a program
file called
Autoexec.bat --When
you first
start DOS,
it looks
a file called
AUTOEXEC.BAT.
COMMAND.COM.
This
is
a
special
DOS
file.
When
you
install
DOS
this
file is
copied to the
Your
computer
contains
some
special
files
that
you
should
understand
their
This file must be stored in the root directory. When DOS starts andpurpose
finds
the file, it
hard drive. Once DOS is booted this program is loaded into memory and translates your
executes
file.
file mayinto
include
commands
that control
different settings.
commandsthe
typed
inThis
near-english
a language
the computer
understands.
For example, you might include a command that tells DOS where your programs
are located. This command is called a path command.
The following shows a simple AUTOEXEC.BAT file:

This file changes your prompt (C:\>) so that it displays the current subdirectory.
For example, if you are in the directory DATA, which is a subdirectory of C:\WP,
you would- see:
C:\WP\DATA>;
Config.sys
Another
special
file to
that
DOS
to start
CONFIG.SYS,
a program
The PATH command
tells DOS
look
in uses
the DOS
and is
WP
directories for
configuration
file.
Some
applications
require
special
commands.
These
files.
commands are contained in the CONFIG.SYS file. The following shows a simple
CONFIG.SYS file:

These settings control how DOS uses files. Some programs require that these are set to a
certain value. When dealing with these files, keep these rules in mind:

Remember - Don't delete any of the following:


COMMAND.COM
AUTOEXEC.BAT
CONFIG.SYS
As you add applications to the computer, the program manual might tell you to
Don't try to change the contents of COMMAND.COM.
make changes to the AUTOEXEC.BAT file or the CONFIG.SYS file. You must use a
special text editor to modify these files. Be careful when making any changes. You
should understand each command in the file before changing anything.
As DOS
takes control
of thePrompt
system, it may display several messages on the monitor. It may
The
MS-DOS
Command
also ask you to enter the correct date and time. Eventually, DOS will display the command
prompt. You have to be at the DOS prompt before you can try any of the DOS commands.
In its standard form, the prompt looks like this:

This prompt just displays the default drive


However, some PCs are set up so the prompt displays the current directory along with the
default drive in this form the prompt will look like:
No matter what the prompt looks like, it still means the DOS command processor is waiting for
your command.

Entering and Correcting a MS-DOS Command

To enter a DOS command, you type in the command at the command prompt and press the
Enter/Return key.
That's all there is to it! With few exceptions, DOS does not care whether you use upper- or
lower-case letters in commands.
Subdirectory Shortcuts -The dot-dot (..) file in every subdirectory is used by DOS to support
That
is why
thesubdirectory's
root directoryparent
has nodirectory.
dot-dot file; the root has no parent. You can use the dotlinkage
to the
dot file as a shortcut to change to the parent of the subdirectory on which you are currently
logged.
By changing to the dot-dot subdirectory, you automatically change to the parent of the
current subdirectory without needing to remember its name.

Potrebbero piacerti anche