Académique Documents
Professionnel Documents
Culture Documents
MS-DOS
USING MS-DOS.......................................................................................................................2 THE MS-DOS COMMAND LINE PROCESSOR ...............................................................3
USER INTERFACE........................................................................................................................................3
COMMAND STRUCTURE..................................................................................................4
SYNTAX..........................................................................................................................................................5
HOW TO LEARN DOS COMMANDS.................................................................................6 COMMANDS AVAILABLE IN WINDOWS 95/98/ME/2000............................................7 DOS AND WINDOWS TUTORIALS .................................................................................8
MS-DOS 6.22 COMMANDS........................................................................................................................10 WINDOWS 95/98/ME EXTERNAL COMMANDS .....................................................................................11 WINDOWS 95/98/ME INTERNAL COMMANDS.......................................................................................11 WINDOWS 2000 COMMAND SET..............................................................................................................12
WINDOWS XP COMMAND SET ......................................................................................14 INSTALLING MS-DOS 6.22................................................................................................16 DISK BASED OPERATING SYSTEMS..............................................................................................22
The Configuration Files...............................................................................................................................23 BATCH FILES..............................................................................................................................................25
KemTec 2001-2003
USING MS-DOS
Although Windows 95/98/NT/ME/2000and XP now dominate the operating system market, there are tens of thousands of PCs using MS-DOS as the underlying operating system. Some knowledge of MS-DOS is therefore an essential requirement of every PC service technician. It is also useful for troubleshooting, for example, if Windows 95/98/ME fails to boot properly for some reason, you usually get the chance to boot to the command prompt, or into MS-DOS mode. In this mode, Windows Setup only loads a few basic files thus stopping short of loading the application or driver that caused the crash. The technician can then enter various commands to check the system or run DOS based diagnostics software etc. When installing or reinstalling Windows you can boot from the Windows Startup disk and enter commands to partition and format the hard disk or edit config.sys and command com. You can also use the command prompt from the Windows desktop for fast file manipulation, for example, to make a copy of a floppy disk in the A: drive you simply enter Diskcopy a: b: To do this in Windows 95/98/ME/2000/XP: Press Ctrl/ESC then 'R' (or Click on Start, then Run), for the command prompt. In the command prompt box, enter Diskcopy a: a You will now be prompted to insert the source disk in drive A: and after copying the disk to memory, you will be prompted to insert the target disk in drive A:. You can also quickly move, copy, rename or erase files. Unfortunately in command mode you can only work with short file names up to eight characters in length. Long file names are shown in truncated form. If you intend to take certain lead body exams in PC support you may well find some questions on MS-DOS, so it really is worth making the effort to learn the more useful commands and gain some familiarity with the syntax. 1 Some experimenters may be interested in setting up an MS-DOS based system on an old 486 or legacy Pentium system purposely to learn MS-DOS. Using an old system like this will allow you to become more adventurous, eliminating the fear of doing something catastrophic to the OS or stored files on your best computer. Later in this section we will take you through a typical MS-DOS installation.
KemTec 2001-2003
Windows is a GUI interface and this is the most popular interface for todays applications as it affords a simple, effective and friendly WIMP 2environment. Menu driven interfaces are often used for specialist applications where the user can only interact by making selections by clicking specific keys or interacting with a touch screen. In a Command driven interface, the user interacts by typing commands and data at the keyboard. MS-DOS is inherently a command driven interface but applications running in that environment can provide a GUI interface. Indeed Windows 3.* is such an application. There are a few advantages of a command driven interface: Uses less system resource memory, processor time Minimum hardware requirement elaborate graphics system not necessary Allows direct user interaction with the OS
However these advantages are modest compared to those offered by GUI interfaces. The first thing most people find when first confronted with MS-DOS after using a GUI system, is how difficult it is to carry out basic tasks that are taken for granted in Windows. Every action requires a command and often a set of parameters that the user has to remember. Another disadvantage is that you often cannot immediately see the results of your actions. In Windows all you have to remember is where things are and how to use the mouse. For example to move a file named Sue from the TEMP directory (folder) to a directory called MYFILES in Windows, you just go into Windows Explorer and left click on the file Sue in TEMP and while depressing the left mouse button, drag it to the MYFILES folder, then release the button and hey presto! To do the same thing in MS-DOS you enter the following command at the DOS prompt: MOVE c:\temp\sue c:\myfiles It is an efficient system just one concise statement is all thats required but until you know the commands verbatim, it can be very frustrating to use.
2
WIMP stands for Windows, Icons, Menus and Pointing devices. KemTec 2001-2003
COMMAND STRUCTURE
MS-DOS commands are entered into the command line. When in DOS mode, this is identified by the DOS prompt usually displayed thus:
c:\ >
DOS commands can have up to three parts the Command Name, Parameters and Switches. Command Name This is the part of the command you type first. Its invokes the action you want to carry out and its name gives you a clue to its purpose. Some commands have just a command name. Such as VER which informs you of the version of DOS you are working on, or CLS which clears the DOS screen area. Parameters Some commands need an additional parameter or set of parameters to define what you want the command to act upon. For example it could be a file name or a directory.
In the next example there are two parameters, the source file to be copied i.e. myfiles.doc and the name you want it to be copied to i.e. yourfiles.doc . Copy myfiles.doc yourfiles.doc Switches A switch is usually a single alphanumeric character preceded by a forward slash /. These allow you to modify the way a command is processed. The classic example is the Directory command Dir . This allows you to view the contents of a directory on screen. If you enter dir to view a long directory, the contents will scroll through on the screen very quickly and you will only see the contents at the end of the directory. However using the /p switch allows you to view a page (screen) at a time. Using another switch with the same command this time /w , allows you view the directory in wide format thereby fitting more of the directory on the screen. Dir /p Dir /w
KemTec 2001-2003
SYNTAX
You must enter commands, parameters and switches accurately to get the correct result from the command processor.
Office Home
Example 1: The path to the subdirectory 'Mydocs' from the root directory is simply c:\mydocs. Example 2: The path to the subdirectory 'Current' from the root directory is c:\Myphotos\Business\Current. 5
KemTec 2001-2003
Figure 1 If you have access to an old MS-DOS system or you have previously upgraded from Windows 3.1 to Windows 95/98, one way to learn the old MS-DOS 6.22 commands is to use the MS-DOS Help facility. To see the function of each command, simply select it using the mouse or arrow keys then either click the left mouse button or press enter. Note: If you are running later versions of Windows 95,98 or ME, you may not have the old MS-DOS help file installed on your hard drive. However these files are on your Windows 95/98.ME Installation CD. Find the OldMS-DOS directory on your CD. It is usually a subdirectory of the Tools directory on a Windows 98/ME CD or a subdirectory of the Other directory on a Windows 95 CD. NOTE: There is a full list of MS-DOS 6.22 commands at the end of this Appendix.
KemTec 2001-2003
Figure 2 In Windows 2000 : Go to the command prompt (i.e. click Start, highlight Programs/Assessories then click on Command Prompt.) In the Command Prompt window, type the command name you want help on and then enter a space followed by /?.
TUTORDOS
Tutordos is an excellent little program that helps the absolute DOS beginner to quickly learn to use some of the common DOS commands. It is also great for anyone needing to brush up on MS-DOS. Copy the program to a disk in the a: drive, as directed in the readme file and use it! Running in MS-DOS or in an MS-DOS window, go into the tutordos directory by typing the following command .
CD A:\TUTORDOS
now run the program by typing;
The DOS QUIZ programs are a great way to test your knowledge and use of MS-DOS once you have gained some proficiency in the use of MS-DOS commands. Before you try each quiz program, please read the accompanying .doc and .lst files, they tell you more about the software and how you can register your copy. To run the DOS6QUIZ program that you have previously copied to a directory of the same name, repeat the above commands substituting the name dos6quiz for tutordos.
KemTec 2001-2003
HTUTOR
To use this program, extract it to a disk in the A drive using Winzip or Pkunzip. Then type;
HTUTOR
For information on MS-DOS commands click on the Advanced Topics button or enter A until Advanced Topics is highlighted, then press Enter. You can change the colours used in the display by clicking Configure at the top of the display window or Alt/C. Note: Because these tutorial programs are quite long in the tooth, no guarantee can be given that they will still be available when this book is published.
KemTec 2001-2003
KemTec 2001-2003
10
Table 2 Windows 95/98/ME external commands The external commands listed above can be executed from the Windows 95/98/ME command prompt.
11
KemTec 2001-2003
KemTec 2001-2003
12
Del Dir Diskcomp Diskcopy Doskey Format Label Mode More Path Print Prompt Recover Rmdir Sort Xcopy
New switches provide many more functions. New switches provide many more functions. Switches /1 and /8 are not supported. Switch /1 is not supported. Available for all character-based programs that accept buffered input. Doskey has been improved by a series of enhancements. 20.8 MB optical drive supported. Switches /b, /s, and /u are not supported. The symbols ^ and & can be used in a volume label. Extensive changes. New switches provide many more functions. The %PATH%environment variable appends the current path to a new setting at the command prompt. Switches /b, /c, /m, /p, /q, /s, /t, and /u are not supported. New character combinations allow you to add ampersands ($a), parentheses ($c and $f), and spaces ($s) to your prompt. Recovers files only. New /s switch deletes directories containing files and subdirectories. Does not require TEMP environment variable. File size is unlimited. New switches provide many more functions. Table 5 The modified MS-DOS Commands of Windows 2000
13
KemTec 2001-2003
Join
Increased partition size and an improved file system eliminate the need to join drives. Memmaker Windows 2000 automatically optimizes the MS-DOS subsystem's memory use. Menucolor Multiple configurations of the MS-DOS subsystem are not supported. Menudefault Multiple configurations of the MS-DOS subsystem are not supported. Menuitem Multiple configurations of the MS-DOS subsystem are not supported. Mirror Not supported in Windows 2000. Msav The Msav program is not supported. Msbackup Windows 2000 provides the Backup utility (in the Administrative Tools in Control Panel) for computers with tape drives, or the xcopy command for computers without tape drives. Mscdex It is unnecessary to configure the MS-DOS subsystem to use a CD-ROM drives. Windows 2000 provides access to CD-ROM drives for the MS-DOS subsystem. Msd Use the System Information snap-in. To start System Information, click Start, click Run, and then type msinfo32. Numlock Not currently supported. Power The Power utility is not supported. Restore Not currently supported. Scandisk The Scandisk utility is not supported. Smartdrv Windows 2000 automatically provides caching for the MS-DOS subsystem. Submenu Multiple configurations of the MS-DOS subsystem are not supported. Sys Windows 2000 will not fit on a standard 1.2 MB or 1.44 MB floppy disk. Undelete Not supported in Windows 2000. Unformat Not supported in Windows 2000. Vsafe The Vsafe program is not supported. Table 6
KemTec 2001-2003
14
CLS Clears the screen. CMD Starts a new instance of the Windows command interpreter. COLOR Sets the default console foreground and background colors. COMP Compares the contents of two files or sets of files. COMPACT Displays or alters the compression of files on NTFS partitions. CONVERT Converts FAT volumes to NTFS. You cannot convert the current drive. COPY Copies one or more files to another location. DATE Displays or sets the date. DEL Deletes one or more files. DIR Displays a list of files and subdirectories in a directory. DISKCOMP Compares the contents of two floppy disks. DISKCOPY Copies the contents of one floppy disk to another. DOSKEY Edits command lines, recalls Windows commands, and creates macros. ECHO Displays messages, or turns command echoing on or off. ENDLOCAL Ends localization of environment changes in a batch file. ERASE Deletes one or more files. EXIT Quits the CMD.EXE program (command interpreter). FC Compares two files or sets of files, and displays the differences between them. FIND Searches for a text string in a file or files. FINDSTR Searches for strings in files. FOR Runs a specified command for each file in a set of files. FORMAT Formats a disk for use with Windows. FTYPE Displays or modifies file types used in file extension associations. GOTO Directs the Windows command interpreter to a labeled line in a batch program. GRAFTABL Enables Windows to display an extended character set in graphics mode. HELP Provides Help information for Windows commands. IF Performs conditional processing in batch programs. LABEL Creates, changes, or deletes the volume label of a disk. MD Creates a directory. MKDIR Creates a directory. MODE Configures a system device. MORE Displays output one screen at a time. MOVE Moves one or more files from one directory to another directory. PATH Displays or sets a search path for executable files. PAUSE Suspends processing of a batch file and displays a message. POPD Restores the previous value of the current directory saved by PUSHD. PRINT Prints a text file. PROMPT Changes the Windows command prompt. PUSHD Saves the current directory then changes it. RD Removes a directory. RECOVER Recovers readable information from a bad or defective disk. REM Records comments (remarks) in batch files or CONFIG.SYS. REN Renames a file or files. RENAME Renames a file or files.
15
KemTec 2001-2003
REPLACE Replaces files. RMDIR Removes a directory. SET Displays, sets, or removes Windows environment variables. SETLOCAL Begins localization of environment changes in a batch file. SHIFT Shifts the position of replaceable parameters in batch files. SORT Sorts input. START Starts a separate window to run a specified program or command. SUBST Associates a path with a drive letter. TIME Displays or sets the system time. TITLE Sets the window title for a CMD.EXE session. TREE Graphically displays the directory structure of a drive or path. TYPE Displays the contents of a text file. VER Displays the Windows version. VERIFY Tells Windows whether to verify that your files are written correctly to a disk. VOL Displays a disk volume label and serial number. XCOPY Copies files and directory trees.
KemTec 2001-2003
16
Microsoft MS-DOS 6.22 Setup Welcome to Setup. The Setup program prepares MS-DOS 6.22 to run on your computer. To set up MS-DOS now, press ENTER. To learn more about Setup before continuing, press F1. To exit Setup without installing MS-DOS, press F3. Note: If you have not backed up your files recently, you might want to do so before installing MS-DOS. To back up your files, press F3 to quit Setup now. Then, back up your files by using a backup program. To continue Setup, press ENTER. ENTER=Continue Fl=Help F3=Exit F7=Install to a Floppy Disk
Microsoft MS-DOS 6.22 Setup Setup needs to configure the unallocated space on your hard disk for use with MS-DOS. None of your existing files will be affected. To have Setup configure the space for you, choose the recommended option. Configure unallocated disk space (recommended). Exit Setup. To accept the selection, press ENTER. To change the selection, press the UP or DOWN ARROW key, and then press ENTER. ENTER. ENTER=Continue Fl=Help F3=Exit
17
KemTec 2001-2003
Setup will restart your computer now. Please make sure Setup Disk 1 is in drive A. To continue, press ENTER.
KemTec 2001-2003
18
Figure 6 WAIT while the hard drive parameters are read from the CMOS setup memory and the drive is automatically partitioned for MS-DOS. After a few seconds the following screen appears....... Microsoft MS-DOS 6.22 Setup Formatting Hard Disk Drives All of your disk space is configured for use with MS-DOS. This space is being formatted now.
Figure 7
Wait until 100% of the drive is high level formatted and the system files are transferred ......
Microsoft MS-DOS 6.22 Setup
Setup will use the following system settings: Date/Time: Country: Keyboard Layout: The settings are correct. 07/13/95 22.55 United States United States
If all the settings are correct, press ENTER. To change a setting, press the UP or DOWN ARROW keys to select it. Then press ENTER to see alternatives.
19
KemTec 2001-2003
Figure 8 Use the UP and DOWN arrow keys to change the country and keyboard settings to United Kingdom. If you wish you can also alter the data and time.
Microsoft MS-DOS 6.22 Setup MS-DOS 6.22 supports the character sets used in different countries. Choose the character set you want.
Poland Portugal Spain Sweden Switzerland United Kingdom United States Yugoslavia
To accept the selection, press ENTER. To change the selection, press the UP or Down Arrow key, and then press ENTER. ENTER=Continue F1=Help F3=Exit ESC=Previous Screen
Figure 9 PRESS ENTER and you are prompted to change or accept the name of the DOS
directory, C:/DOS...........
MS-DOS 6.22 Setup Setup will place your MS-DOS files in the following directory: C:\DOS To place MS-DOS files in this directory, press ENTER. To place MS-DOS files in a different directory, type its path and press ENTER.
KemTec 2001-2003
20
Figure 10 Press ENTER and wait while MS-DOS installs in the C:\DOS directory. You will subsequently be prompted to place first disk 2 and then disk 3, into drive A:. Remember to press enter after you insert each disk. MS-DOS is now installed. Remove the floppy from drive A: and re-boot the system. The automatic installation creates a basic CONFIG.SYS and AUTOEXEC.BAT file on the root directory of the hard disk (C:\). The files are shown below. Notice how the country and keyboard definition in the config.sys and autoexec.bat respectively have been set to the UK version. Typical CONFIG.SYS file DEVICE = C:\DOS\SETVER.EXE COUNTRY=044,,C:\DOS\COUNTRY.SYS FILES = 30 Typical AUTOEXEC.BAT file @ECHO OFF PROMPT $P$G PATH C:\DOS SET TEMP=C:\DOS KEYB UK,,C:\DOS\KEYBOARD.SYS
Figure 11
At this point MS-DOS 6.22 is now successfully installed on the hard disk (Drive C:). Part of DOS has been placed in three files in the root directory of drive c:, named I/O.sys, MSDOS.sys and Command.com and the other part is stored as several individual files in a sub directory named DOS. In addition, two system configuration files known as config.sys and Autoexec.bat are also present in the root directory. We can examine the contents of the hard disk at this point, by first entering the root directory of drive c: by typing: c:\ Enter followed by the view directory (wide view), commandrive:
dir/w
Enter
The files COMMAND.COM, CONFIG.SYS, AUTOEXEC.BAT and a directory named DOS are listed on screen. The DOS directory is indicated by square brackets around the directory name, thus, [DOS].
21
KemTec 2001-2003
C:\> dir Volume in drive C has no label Volume Serial Number is 1D40-4A12 Directory of C:\ COMMAND.COM 4 file(s) CONFIG.SYS AUTOEXEC.BAT [DOS]
Notice that the files IO.SYS and MS-DOS.SYS previously mentioned, are not visible. You can't see them because they are automatically hidden and made into read-only files to prevent them from being accidentally erased. The three files listed above are crucial DOS files that contain part of the system boot-loader program, and part of the DOS command library, the so called internal commands. The rest of the DOS command library, known as the external commands are placed in the [DOS] directory and are visible to the user. If you would like to see the hidden system files IO.SYS and MS-DOS.SYS. Make sure you are in the root directory and simply type:
attrib
This will list all the files in the root directory including the hidden system files.
22
be far more difficult for the end user to install and this would adversely effect volume sales and the long term success of the product.
CONFIG.SYS
Config.sys resides in the root directory of the boot disk and is executed automatically after the system has booted. The main purpose of config.sys is to: (i) make DOS aware of extra driver software, (ii) allow system memory space for information processing and (iii) configure the system to conform to international standards. To inform DOS of the new driver software, a device statement is installed in config.sys (or sometimes in autoexec.bat). DOS itself provides a handful of standard device drivers, these are listed in table 3.1.7. Device drivers provided with MS-DOS 6.22 ANSI.SYS DISPLAY.SYS DRIVER.SYS EGA.SYS RAMDRIVE.SYS INTERLNK.EXE POWER.EXE Table 7
CONFIG.SYS COMMANDS
To effect a user installable device driver facility, DOS provides a set of commands that can be added to the config.sys file. The purpose of each command is described below: COMMAND BREAK BUFFERS COUNTRY DEVICE DRIVPARM FCBS FILES LASTDRIVE SHELL STACKS PURPOSE Enables more frequent checking of the Ctrl-C or control-Break, keys. Sets the number of sector buffers. Allows international time, date, and currency to be set. Installs a particular device driver in the system. Defines parameters for block devices. Sets the number of File Control Blocks that can be opened concurrently. Sets the number of files that can be opened at once. Sets the maximum number of drives that can be accessed. Change to a user defined command processor. Specifies the no. memory stacks for hardware interrupts.
23
KemTec 2001-2003
Table 8 Don't worry if some of these terms sound like double-Dutch they do to most people meeting DOS for the first time. The important thing to do is to at least make yourself aware of config.sys and autoexec.bat files. They are not used on Windows 2000 systems or on new Windows ME systems, however they are still found frequently on Windows 95 /98 systems. This is particularly the case on systems upgraded from DOS or Windows 3.1. The less used commands are often inserted automatically when new driver software is installed. The more you get your hands on older systems, the more quickly you will feel at home using Config.sys and Autoexec.bat.4 The example config.sys file below, shows some of the more widely used commands. BREAK=ON FILES = 50 BUFFERS = 30 COUNTRY = 044, , C:\DOS\COUNTRY.SYS DEVICE = C:\DOS\SETVER.EXE DEVICE = C:\MOUSE\MOUSE.SYS LASTDRIVE = f Each of the commands in the above config.sys file will now be explained briefly: The BREAK = ON command tells MS-DOS to check for the Ctrl-C or Ctrl-Break key combination as often as possible. (This key combination normally only allows a break to take place during a printing process to screen or printer.) Depending on the software in use, the BREAK = ON command may enable the break key sequence during disk processing or program execution. FILES = 50 allocates space in memory for information on up to twenty open disk files called by MS-DOS. The maximum number of files that can be opened at once and called by MSDOS by this command is 255. Note for the inquisitive reader: The maximum number of files that can be opened by an application program in MS-DOS is 65534. This is achieved when the program executes interrupt 21h, service 67 effectively overriding the config.sys limit of 255. BUFFERS = 30 allocates a block of memory as a disk buffer. This allows MS-DOS to hold data in the buffer area during disk reading and writing. Each buffer takes up 512 bytes of memory so this particular command line allocates 10k bytes of memory as a disk buffer, reducing the amount of conventional RAM available for applications. In a simple DOS based system, the use of buffers can increase the performance of disk operations. Many DOS based word processors insist on a minimum buffer size.
KemTec 2001-2003
24
COUNTRY = 044, , C:\DOS\COUNTRY.SYS, tells MS-DOS to follow the UK Date, Time and number format. The number 044 is the international dialling code for the UK. A common failure to insert this command results in the default American date and time formats. The statement following the two commas indicates the path to DOS's country.sys command. If country.sys is placed in the root directory, then this statement is not necessary, however it is neater to leave it as it is, in the DOS directory. Together with the KEYB UK command in autoexec.bat, these commands tell the system to use British characters and key functions. For example the full A to Z alphabet, sign, day/month/year, and 24 hour time format, is adopted. If you wish to write a letter in French for example, then you can change the Country value in config.sys to 033 and the KEYB command in autoexec.bat, to KEY FR. 'DEVICE = C:\DOS\SETVER.EXE' This loads a table called the 'version table' into memory. This is contains a list of the DOS version that each program on the disk was originally designed to run on. Most DOS programs run on any DOS version without problems. However some must be loaded into the version table so that DOS can trick the application into thinking that the correct version of DOS is present. To load a particular program to the version table the command SETVER filename n.nn is used. For example to place a DOS 3.3 program called 'pack1.exe' into the version table using DOS6.22, the command SETVER pack1 3.3 is used. To see the contents of the version table you simply enter setver. 'DEVICE = C:\MOUSE\MOUSE.SYS' installs the mouse driver, mouse.sys allowing MSDOS to communicate with the mouse hardware when required. The disk supplied with the mouse package usually contains a mouse.sys and a mouse.com file. This allows the mouse to be configured from either config.sys or autoexec.bat respectively. See the example config.sys file on page 3.37. 'LASTDRIVE = f ', This command simply specifies the maximum number of drives that can be accessed form DOS, in this case six drives, a:,b:,c:,drive:,e:,and f:.
BATCH FILES
A batch file is a sequence of DOS commands saved in a file with a .BAT extension after the name. When the batch file called up via the keyboard or via another program, each command is executed in sequence. As a simple example of a bat file we will assume we have a wordprocessor program called myword.exe, saved in a subdirectory of the apps directory, named wordproc. See the directory structure in figure 3.1.
25
KemTec 2001-2003
Figure 13 To run the program called myword we must enter the path followed by the filename thus, C:\apps\wordproc\ myword, To save having to type this each time we want to execute the program, we will make a batch file named word.bat that runs the program by simply entering the name word. To do this we could enter the following from the root directory of drive C using the DOS copy to Console command (copy con):
lastly hold down the Ctrl key and press the z key, i.e. Ctrl z, to save the file. The file called word.bat is now saved to the root directory of drive c: To run myword now all we have to do is type word and then press enter.
AUTOEXEC.BAT
Any batch file labelled AUTOEXEC.BAT will run automatically when the system has booted. This is a useful facility in aDOS based machine as it allows the user to run a chosen application immediately the system is booted. For example a computer system can be made to automatically run a wordprocessor program by inserting the path and file name in the autoexec.bat file. The normal use of autoexec.bat however is to automatically run DOS commands, allowing the system to be configured as required. It may seem strange that config.sys and autoexec.bat
KemTec 2001-2003
26
are both used to configure the system. The reason for this is that autoexec.bat can run normal DOS commands whereas config.sys contains files that can only be read and processed by the hidden DOS boot program called IO.SYS, when the system is booted. A simple autoexec.bat file is shown below: @ECHO OFF PATH C:\;C:\DOS;C:\APPS\WORDPROC;C:\UTILS PROMPT CURRENT DIRECTORY $P$G KEYB UK,, C:\DOS\KEYBOARD.SYS Each line of the above autoexec.bat file will now be explained briefly: ECHO OFF, prevents each line being executed, from appearing on the screen, a process known as echoing. ECHO ON enables screen echoing. The @ sign placed before the ECHO command, prevents the command itself from echoing on the screen. PATH C:\;C:\DOS;C:\APPS\WORDPROC;C:\UTILS, tells MS-DOS which directories, and in what order, it must search for external commands. For example from the directory structure of figure 13, to run myword.exe in the wordproc directory, instead of using a separate bat file as shown earlier, we simply include its path in autoexec.bat. i.e., C:\APPS\WORDPROC. From the PATH statement in autoexec.bat: After the system has booted and confi.sys and autoexec.bat have executed, typing myword followed by the ENTER key, in the root directory would force MS-DOS to first first search for the command in the root directory, then in DOS and finally in WORDPROC. The use of the semicolon ';' in the path statement, allows several paths to be specified in one line. NOTE: Entering PATH on its own, shows the current path setting on the screen. 'PROMPT current directory $p$g', changes the normal default DOS prompt to display the current directory name, the time and date, or any text the user wishes. In this case the words current directory followed by the working directory, and the > character are shown. 'KEYB UK,, C:\DOS\KEYBOARD.SYS', this configures the keyboard for UK English and therefore enables the full QWERTY, alphanumeric characters and special symbols like the sign. This is used to complement the COUNTRY= 044 command in config.sys.
27
KemTec 2001-2003
Runs a specified command for each file in a group of files. It must be used with IN and DO. Allows the batch file sequence to be processed at another part of the batch file, pointed to by a label name.
If Carries out a command or sequence of commands depending on the logical result of a specified condition. Pause Stops a batch file from continuing until a key is pressed. Rem Placed before the text, allows notes (REMarks), to be made about each part of a batch program. Shift Changes the position of replaceable parameters. Table 9 The autoexec.bat file can contain any DOS commands well as the batch processing commands shown above.
KemTec 2001-2003
28
(i)
Executes ROM based diagnostic routines and sets up programmable hardware devices. Checks for system software files on the default drive, namely IO.sys, MS-DOS.sys. Loads the hidden files IO.sys and MS-DOS.sys from the default drive into RAM. Checks for a CONFIG.SYS file and executes it, if present. Passes control to COMMAND.COM, a file in the root directory of the default drive.
(vi) The command processor looks for autoexec.bat and executes it if present. If there is no autoexec.bat file the command processor prompts for the date and time before handing control over to the user, i.e. it awaits for a command from the keyboard. If there is an autoexec.bat file this is executed first. What happens after this depends on the command sequence in autoexec.bat, but usually it loads a PATH for the various application programs present, set the on screen prompt
29
KemTec 2001-2003
KemTec 2001-2003
30
Figure 15 Basic memory map an XT system running MS-DOS. As more powerful CPUs became available the CPUs inherent addressing range increased significantly. The 486 and modern Pentium style CPUs have 32 address wires, so they can directly address a maximum of 4 Gigabytes of RAM. Unfortunately, even though the PC hardware is capable of addressing these huge amounts of memory, DOS isn't! It is held back by the need to offer downward compatibility and is therefore restricted to the 640KB conventional memory limit. The downward compatibility requirement of DOS, until the advent of Windows 95 and Windows NT, held back the progress of the PC compared to other personal computer systems such as the Apple Mac.
31
KemTec 2001-2003
EXPANDED MEMORY
(obsolete, but sometimes the hapless PC technician still comes across it on some old legacy systems) In an attempt to increase the memory used by DOS application programs, the Expanded Memory System (EMS) was introduced by Lotus, Intel and Microsoft. The last version, produced in 1987, was known as the LIM 4 specification (sometimes referred to as EMS 4.0). This allowed all XT and AT PCs fitted with an EMS RAM adapter card, and expanded memory manager software, to run applications that would normally demand more memory than the 640KB DOS limit. EMS uses a technique known as bank switching. Instead of addressing memory contiguously as in conventional memory reads and writes, it copies 16KB blocks of memory from the EMS adapter card to a specially reserved area of RAM in the 384KB upper memory area. The 16KB blocks are known as pages. Four such pages were stored in a block of upper memory known as a page frame. An EMS memory card containing several Megabytes of RAM could therefore store large amounts of data including large application programs. However, because only four pages (64KB), could be copied across to a page frame at a time, the system was inherently slow. The advantage of the EMS specification is that is allows XT class machines to use larger programs and handle larger amounts of data. The disadvantages were all too apparent. As well as it's slow performance, application software had to be specifically written for the LIM 4.0 driver software. Memory adapter cards are now a thing of the past as more and more memory is being integrated onto the motherboard. This has the added advantage that ram devices, can now run at the full external CPU bus speed (usually 66MHz), instead of the slow ISA bus speed of 8MHz.. As page switching was a slow and cumbersome process, EMS is now classed as obsolete and is no longer supported by the original vendors. However, it is wise to become familiar with it, as many DOS machines still have EMS installed. The games fraternity, until quite recently, used EMS to increase the size of DOS based games. This allowed better graphics and more elaborate scenarios to be incorporated into the software. Such games are still being sold in most games stores, often at greatly reduced prices. To install an EMS compatible driver on a PC AT with a 386SX or greater processor, the EMS emulator called EMM386.EXE, supplied with MS-DOS 5.0 or greater, should be used. This is an upper memory manager and EMS emulator, for use with extended memory. Note: Extended memory is discussed later in this section. As EMS is probably only needed on the odd occasion, e.g., to run DOS based games 5, it is best to make a special floppy boot disk, rather than install an EMS driver onto the C: drive. To make an EMS boot disk follow the procedure below:
There are a lot of high quality CD-ROM based MS-DOS games and multimedia now sold at rock bottom prices because they won't run on modern Windows systems. KemTec 2001-2003
32
STEP 1: Format a blank disk and install a DOS boot sector and system files by typing format a:/s
then press enter.
STEP 2: Once the boot disk has been created, copy config.sys and autoexec.bat from the
root directory of drive C: to the floppy disk A: by typing:
STEP 3: Now invoke the DOS EDITOR (EDIT.COM) in the DOS directory of drive c: by
typing:
c:\dos\edit
Once in EDIT, open your existing config,sys file, installed on the root directory of drive A: by typing :
alt f then o
then type
a:\Config.sys
Insert the new line DEVICE=C:\DOS\EMM386.EXE 1024 RAM It must be placed below the line DEVICE=C:\DOS\HIMEM.SYS. See the example config.sys file below. CONFIG.SYS DEVICE=C:\DOS\HIMEM.SYS BUFFERS=30 FILES=40 DOS=UMB LASTDRIVE=E DOS=HIGH COUNTRY=044,,C:\DOS\COUNTRY.SYS
Figure 16 A typical Config.sys file Save the new config.sys file by typing:
alt f then a
then in the filename box that appears, type:
a: Config.sys
Exit the editor by typing :
STEP 5: To see your new memory configuration run the DOS MEM command. To do this
type:
mem
The DOS mem command lists the current memory configuration.
The new 2048KB EMS memory area that you have just created, will be displayed in a similar fashion to that shown in figure 18.
KemTec 2001-2003
34
Memory Type Total ---------------------Conventional 640K Upper 187K Reserved 384K Extended (XMS) 2,885K ---------------- ------Total memory 4,096K Total under 1 MB 827K
= 23K 81K
Used -------
+ 617K 106K
Free -------
Largest executable program size 617K (632,176 bytes) Largest free upper memory block 106K MS-DOS is resident in the high memory area Figure 17 Memory before EMS is installed.
Memory Type Total = Used + Free ---------------- ------------------Conventional 640K 41K 599K Upper 91K 74K 17K Reserved 384K 384K 0K Extended (XMS)* 2,981K 485K 2,496K ---------------- ------------------Total memory 4,096K 984K 3,112K Total under 1 MB 731K 115K 616K
* EMM386 is using XMS memory to simulate EMS memory as needed. Free EMS memory may change as free XMS memory changes. Largest executable program size 599K (613,184 bytes) Largest free upper memory block 17K MS-DOS is resident in the high memory area. Figure 18 Memory after 1024k of EMS is installed.
EXTENDED MEMORY
35
KemTec 2001-2003
Many DOS based, applications and GUI programs like Windows need memory in excess of the normal 640k DOS limit. The old LIM 4.0 expanded memory system did not do justice to the powerful CPUs emerging on the market. Coupled to this was the burgeoning demand for more potent applications. What was needed was a more modern memory management system that could utilise the huge memory addressing capability of the then new 386 and 486 CPUs. To go some way to meeting this requirement, Microsoft added drivers and memory management utilities to MS-DOS-5, and onwards, to support Extended Memory. This is memory above the 1MB 8086/8088 addressing capability, so it is unsuitable for PC XTs. Unfortunately the old DOS 640KB limit still applied to conventional DOS application programs but new programs can be specially written to utilise the vast extended memory area. Microsoft's extended memory manager is known as HIMEM. In a PC system with a 386SX or greater processor and MS-DOS 5.0 to 6.22 installed, the available memory is divided into areas known as Conventional Memory, Upper memory, High Memory and Extended Memory. This is shown if figure 3.1. 48. Maximum amount of memory actually installed Extended Memory (XMS)
High Memory Area (HMA) 1MB Upper memory area (384k) 640k Conventional Memory (640k)
0k Figure 19 Basic memory map of a PC with MS-DOS 5 or greater installed. Instead of storing device drivers in conventional memory, as they were in older versions of DOS, they can be stored in Upper Memory thus freeing up more of the 640KB conventional
KemTec 2001-2003
36
memory for DOS applications. Unused portions of upper memory are known as UMBs (Upper Memory Blocks). By including the DOS devicehigh command before a device driver statement in config.sys, MS-DOS will attempt to fit the device driver into a spare UMB rather than use up valuable conventional memory space. The High Memory Area (HMA) is the first 64k of extended memory. Part of DOS can be made to run from this area by incorporating the DOS=HIGH statement in config.sys thereby freeing up space in conventional ram. Extended Memory (XMS) is ram above 1MB including HMA. Applications that use this area require extended-memory manager software such as HIMEM provided with DOS 5.0 and DOS 6.x. Expanded Memory applications on a 386SX or higher machine can be supported in DOS or Windows by invoking the EMM386 expanded memory driver supplied with DOS 5.0 and DOS 6.x.
DEVICE=C:\DOS\HIMEM.SYS DEVICE=C:\DOS\EMM386.EXE NOEMS BUFFERS=30 _ FILES=40 _ DOS=UMB _ LASTDRIVE=E _ FCBS=16,8 _ DEVICEHIGH /L:1,12048 =C:\DOS\SETVER.EXE _ DOS=HIGH _ COUNTRY=044,,C:\DOS\COUNTRY.SYS _ DEVICEHIGH /L:1,15792 =C:\DOS\DISPLAY.SYS CON=(EGA,,1)
37
KemTec 2001-2003
_ DEVICEHIGH /L:1,9072 =C:\DOS\ANSI.SYS _ DEVICEHIGH /L:1,9456 =C:\WINDOWS\PP\SCANDEV.SYS _ DEVICEHIGH /L:1,2640 =C:\WINDOWS\PUBPB\HPSCANER.SYS Figure 20 A typical CONFIG.SYS file for a 80486 based PC running Windows 3.1.
38
Pentium style motherboards have a Primary and Secondary IDE interface built in. If you are using such a motherboard, then install the CD-ROM on the secondary interface and set the CDROM jumper to master. The primary and secondary motherboard IDE connectors are usually labelled IDE 0 and IDE 1, or IDE 1 and IDE 2. Installing a CD-ROM on an older machine is slightly more involved. If the host motherboard only has a primary IDE connector many 386/486 motherboards fall into this category then you must set the CDROM to slave and connect it to the same cable as the hard disk. To do this you need a ribbon cable fitted with two IDC sockets on one end. See table 10.
Primary Cable
master CD-ROM 1 ATA hard disk drive CD-ROM 1 slave CD-ROM 1
Secondary cable
master slave
Set up
CD-ROM, no IDE hard drive A hard drive and a CD-ROM on one cable. Often adopted on 386/486 systems Two CD-ROM drives on one cable also possible on the secondary cable Hard drive on cable 1 and a CD-ROM on cable 2 (The most common arrangement for Pentium systems) Two hard drives on one cable
(SLAVE)
CD-ROM 2
(MASTER)
ATA hard disk drive
(SLAVE)
CD-ROM 1
(MASTER)
ATA hard disk ATA hard disk drive drive ATA hard disk ATA hard disk CD-ROM 1 drive drive (MASTER) ATA hard disk ATA hard disk CD-ROM 1 (SLAVE) drive drive ATA hard disk ATA hard disk ATA hard disk drive drive drive
Two hard drives on one cable and a CDROM drive on the second cable A hard drive on one cable and another hard drive plus a CD-ROM drive on a second cable CD-ROM 1 Two hard drives on one cable and one (SLAVE) hard drive and a CD-ROM drive on a second cable
Table 10 Installation options available for IDE hard drives and CD-ROMs.
39
KemTec 2001-2003
To go to the floppy disk drive type, A: To read the text file type, type readme.txt more
The DOS type command tells MS-DOS to print the readme.txt file on the screen. Unfortunately on a large file it scrolls through far to quickly to read. However the more extension stops scrolling as soon as the screen is full of text to allow you to read it. You can then read the next screen full by pressing any key. If the instructions are in the form of an executable file such as readme.com, readme.exe, or readme.bat then just type the filename, then press enter. Now proceed to install the driver as instructed in the readme file. In our installation example we simply type the following at the DOS prompt:
a: install
then press enter (to access the Floppy disk drive) then press enter. (to run the installation
program) Note: Some manufacturers name the installation program setup.exe. so you would type setup then press enter As the installation program runs the DOS CD driver MSCDEX is searched for and placed in a statement in AUTOEXEC.BAT and the manufacturer's driver named MSCD0001 in our example is set up as a device in CONFIG.SYS. After a successful installation, you are prompted to reboot the system to activate the CDROM drivers.
STEP 2:
Reboot the system by pressing the reset button or pressing Ctrl Alt Del If everything is fine the following events take place: The system boots, MS-DOS loads the OEM device driver 'MSCD0001' listed in CONFIG.SYS. MSCDEX.EXE is invoked from AUTOEXEC.BAT. MSCDEX then performs a system call to the OEM driver to locate the start addresses of the various driver routines. If it finds them, it reports a successful installation on the boot up screen and the CD-ROM is recognised as a valid drive. This is usually the D: drive, when one hard disk partition is installed. If more than one hard disk partition or drive is present the CDROM drive will be allocated as the next available drive.
STEP 3:
TEST THE CD-ROM DRIVE Place a CD in the drive and do a directory listing to check the installation. For example if the drive is set up as the D: drive, type :
D:
KemTec 2001-2003
40
DIR/w
The CD-ROM should behave just like another drive, except you cant write to it You could test it further by placing the CD-ROM provided on this course into the drive and run one of the DOS programs included on the disk.
Assign
(external) Assign [x[:]=y[:] [...]] Redirects disk drive requests from one drive to a different drive.
Attrib
(external) Attrib [drive:][path]filename [/s] Attrib [+r|-r] [+a|-a] [+s|-s] [+h|-h] [drive:][path]filename [/s] Sets or displays the read-only, archive, system, and hidden attributes of a file or directory.
41
KemTec 2001-2003
Backup
(external) Backup drive:[path][filename] drive:[/s][/m][/a][/f:(size)] [/p][/d:date] [/t:time] [/l: [path]filename] Makes a backup copy of one or more files. (in dos version 6, this program is stored on the dos supplemental disk.)
Break
(internal) Break =on|off Used from the dos prompt or in a batch file or in the config.sys file to set (or display) whether or not dos should check for a ctrl + break key combination.
Buffers
(internal) Buffers=(number),(read-ahead number) Used in config.sys to set the number of disk buffers to be used for data input. Also used to set a value for the number of sectors to be read in advance (read-ahead) during data input operations.
Call
(internal) Call [drive:][path]batchfilename [options] Calls another batch file and then returns to current batch file to continue.
Chcp
(internal) Chcp (codepage) Displays the current code page or changes the code page that dos will use.
KemTec 2001-2003
42
Chdir
(internal) Chdir (cd) [drive:]path Chdir (cd)[..] Displays working (current) directory and/or changes to a different directory.
Chkdsk
(external) chkdsk [drive:][path][filename] [/f][/v] Checks a disk and provides a file and memory status report.
Choice
(internal) Choice [/c[:]keys] [/n][/s][/t[:]c,nn] [text] Used to provide a prompt so that a user can make a choice while a batch program is running.
Command
(external) Command [drive:][path] [device] [/p][/e:(size)] [/msg][/y [/c (command)|/k (command)] Starts a new version of the dos command processor (the program that loads the dos internal programs).
43
KemTec 2001-2003
Comp
(external) Comp [drive:][path][filename] [drive:][path][filename] [/a][/c][/d][/l][/n:(number)] Compares two groups of files to find information that does not match. (see fc command).
Copy
(internal) copy [/y|-y] [/a][/b] [drive:][path]filename [/a][/b] [drive:][path][filename] [/v] or copy [/y|-y][/a][/b] [drive:][path]filename+[drive:][path]filename[...][drive:][path][filename] [/v] Copies and appends files.
Country
(internal) Country=country code,[code page][,][drive:][filename] Used in config.sys to inform DOS of the country to use for country specific applications.
Ctty
(internal) Ctty (device) Changes the standard input/output device to an auxiliary device.
Date
(internal) Date mm-dd-yy Displays and/or sets the system date.
KemTec 2001-2003
44
Debug
(external) Debug [pathname] [parameters] A low level MS-DOS utility used to carry out advanced test and configuration utilities.
Defrag
(external) Defrag [drive:] [/f][/s[:]order] [/b][/skiphigh [/lcd|/bw|/go] [/h] Defrag [drive:] [/v][/b][/skiphigh] [/lcd]|/bw|/go] [/h] Optimises disk performance by reorganizing the files on the disk.
Del (erase)
(internal) Del (Erase) [drive:][path]filename [/p] Deletes (erases) files from disk.
Deloldos
(external) Deloldos [/b] Deletes all files from previous versions of an older version of DOS after a new installation.
Deltree
(external) Deltree [/y] [drive:]path [drive:]path[...] Deletes (erases) a directory including all files and subdirectories that are in it.
45
KemTec 2001-2003
Device
(internal) Device=(driver name) Used in config.sys to load DOS device drivers.
Devicehigh
(internal) devicehigh=(driver name) Devicehigh is used in the config.sys file to load DOS device drivers however unlike Device, it installs the device driver into the upper memory area.
Dir
(internal) Dir [drive:][path][filename] [/a:(attributes)] [/o:(order)] [/b][/c][/ch][/l][/s][/p][/w] Displays directories and files stored on disk.
Diskcomp
(external) Diskcomp [drive:] [drive:][/1][/8] Compares the contents of two diskettes.
Diskcopy
(external) Diskcopy [drive:] [drive:][/1][/v][/m] Makes an track by track copy of a diskette.
KemTec 2001-2003
46
Dos
(internal) Dos=[high|low],[umb|noumb] Used in config.sys to specify the memory location for DOS. It is used to load DOS into the upper memory area and to specify whether or not the upper memory blocks will be used.
Doskey
(external) Doskey [reinstall] [/bufsize=size][/macros][/history][/insert|/overstrike] [macroname=[text]] Starts the doskey program to enable you to repeat and or edit the last command used. It can also create command macros. (a record of a certain sequence of dos commands).
Dosshell
(external) Dosshell [/b/t/g/]:[res][n]] Initiates the graphic menu interface for MS-DOS using one of three screen resolution options l,m,h (low medium high).
Drivparm
(internal) Drivparm= /drive:(number) [/c] [/f:(form factor)] [/h:(number)] [/i][ /n][/s:(number)] [/t: (tracks)] Used in config.sys. Defines Drive Parameters for block devices.
Echo
(internal) Echo on|off Echo (message) displays messages or turns on or off the display of commands in a batch file.
47
KemTec 2001-2003
Edit
(external) Edit [drive:][path]filename [/b][/g][/h][/nohi] Starts the ms-dos editor, a text editor used to create and edit text files. e.g.It can be used to edit Config.sys and Autoexec.bat
Emm386
(external) Emm386 [on|off|auto] [w=on|off] Enables or disables emm386 expanded-memory support on a computer with an 80386 or higher processor.
Exe2bin
(external) Exe2bin [drive:][path]filename [drive:][path]filename Converts .exe (executable) files to binary format.
Exit
(internal) Exit Exits a secondary command processor.
Expand
(external) Expand [drive:][path]filename [[drive:][path]filename[ . . .]] Expands a compressed file.
KemTec 2001-2003
48
Fasthelp
(external) Fasthelp [command][command] /? Displays a list of dos commands with a brief explanation of each.
Fastopen
(external) Fastopen drive:[=n][/x] Keeps track of the locations of files for fast access.
Fc
(external) Fc [/a][/c][/l][/lb n][/n][/t][/w][number] [drive:][path]filename [drive:][path]filename File comparison command. It displays the differences between two files or sets of files.
Fcbs
(internal) Fcbs=(number) Used in config.sys to specify the maximum number of file-control blocks that can be open at the same time.
Fdisk
(external) Fdisk [/status] Used to partition hard disk drives or safely examine (status) partition information.
49
KemTec 2001-2003
Files
(internal) Files=(number) Used in config.sys to specify the maximum number of files that can be open at the same time.
Find
(external) Find [/v][/c][/n][/i] "string" [drive:][path] filename[...] Searches for a specific string of text characters in a specified file.
For
(internal) For %%(variable) in (set) do (command) For %(variable) in (set) do (command) Runs a specified command for each file in a set of files.
Format
(external) Format drive:[/1][/4][/8][/f:(size)] [/n:(sectors)] [/t:(tracks)][/b|/s][/c][/v:(label)] [/q][/u][/v] High Level formats a disk to accept DOS files. For example: Format a:/s/v:spare formats the floppy disk in the a drive. The switch '/s' copies the system files io.sys (hidden), msdos.sys (hidden) and command com to the disk to make it bootable. Finally the switch '/v', labels the disk volume 'spare'. It can be any name up to ten characters.
Goto
(internal)
KemTec 2001-2003
50
Goto (label) Unconditionally directs MS-DOS to a go to the specified label in a batch program.
Graftabl
(external) Graftabl [(code page)] Graftabl [status] Allows a monitor to display extended ascii characters depending on the country code page.
Graphics
(external) Graphics [printer type][profile] [/b][/r][/lcd][/pb:(id)] [/c][/f][/p(port)] Runs a program that allows a printer to print the displayed screen contents on graphoical non text only screens.Provides a way to print contents of a graphics screen display.
Help
(external) Help [command] [/b][/g][/h][/nohi] Displays information about a dos command similar to this command list.
If
(internal) If [not] errorlevel (number) (command) [parameters] If [not] (string1)==(string2) (command) [parameters] If [not] exist filename (command) [parameters] Specifies that a command should only be carried out if specific conditional operations in a batch file are met.
Install
(internal)
51
KemTec 2001-2003
Install=[drive: ][\path]filename [parameters] Used in config.sys to load memory-resident programs into memory.
Join
(external) Join drive: [drive:path] Join drive: [/d] Allows the OS to treat directories and files on a disk drive as the contents of another specified drive and path.
Keyb
(external) Keyb [xx][,][yyy][,][drive:][path]filename [/e][/id:(number)] xx = country code yyy = code page Configures the keyboard for a language other than the USA. (Eg keyb uk)
Label
(external) Label [drive:][volume label] Creates or changes or deletes a volume label for a disk.
Lastdrive
(internal) Lastdrive=(drive letter) Used in config.sys to set the maximum number of drives that can be accessed.
Loadfix
(internal) Loadfix [drive:][path]filename [parameters] Ensures that a program is loaded above the first 64k of conventional memory, and runs the program.
KemTec 2001-2003
52
Loadhigh
(internal) Loadhigh (lh) [drive:][path]filename [parameters] Loads a program into the upper memory area.
Mem
(external) Mem [/program|/debug|/classify|/free|/module(name)] [/page] Displays amount of installed and available memory, including extended, expanded, and upper memory.
Memmaker
(external) Memmaker [/b][/batch][/session][/swap:d] [/t][/undo][/w:size1,size2] Invokes the memmaker program, to optimise your computer's memory.
Mirror
(external) Mirror [drive:]path [drive:] path [...] Mirror [d1:][d2:][...] [/t(drive)(files)] [/partn][/u][/1] Saves disk information that can be used by unformat and undelete to recover accidentally erased files.
Mkdir
(md) (internal) Mkdir (md) [drive:]path Creates a new subdirectory.
Mode
(external) Mode n
53
KemTec 2001-2003
Mode lpt#[:][n][,][m][,][p][retry] Mode [n],m[,t] Mode (displaytype,linetotal) Mode comn[:]baud[,][parity][,][databits][,][stopbits][,][retry] Mode lpt#[:]=comn [retry] Mode con[rate=(number)][delay=(number)] Mode (device) codepage prepare=(codepage) [drive:][path]filename Mode (device) codepage prepare=(codepage list) [drive:][path]filename Mode (device) codepage select=(codepage) Mode (device) codepage [/status] Mode (device) codepage refresh Configures system devices.
More
(external) More < (filename or command) (name)|more Forces a file to be displayed one screen at a time.
Move
(internal) Move [/y|/-y] [drive:][path]filename[,[drive:][path]filename[...]] Destination Moves one or more files to the location you specify. This command is also used to rename directories.
Msav
(external) Msav [drive:] [/s|/c][/r][/a][/l][/n][/p][/f][/video][/mouse] Msav /video Scans system for known viruses.
Msbackup
(external) Msbackup [setupfile] [/bw|/lcd|/mda]
KemTec 2001-2003
54
Mscdex
(external) Mscdex /drive:driver [/drive:driver2. . .] [/e][/k][/s][/v][/l:letter] [/m:number] Used to allow MS-DOS to handle CD players.
Msd
(external) Msd [/b][/i] Msd [/i] [/f[drive:][path]filename [/p[drive:][path]filename [/s[drive:][path]filename Microsoft Diagnostics provides technical information about the system.
Nlsfunc
(external) Nlsfunc [drive:][path]filename National Language Support (NLS). Loads country specific information. Uses the country sys file.
Numlock
(internal) Numlock=on|off Used in the config.sys file to specify the state of the numlock key.
Path
(internal) Path; Path [drive:]path[;][drive:]path[...] Sets or displays a search path for executable files.
55
KemTec 2001-2003
Pause
(internal) Pause [comment] Suspends further processing of a batch file until a key is pressed.
Power
(external) Power [adv:max|reg|min]|std|off] Controls power management
Print
(external) Print [/b:(buffersize)] [/drive:(device)] [/m:(maxtick)] [/q:(value] [/s:(timeslice)][/u: (busytick)] [/c][/p][/t] [drive:][path][filename] [...] Used to print a text file.
Prompt
(internal) Prompt [text] [options] Allows you to customize the DOS command prompt.
Rem
(internal) Rem [comment] Used in batch files and in config.sys to insert comments (remarks).
KemTec 2001-2003
56
Rename (ren)
(internal) Rename (ren) [drive:][path]filename [drive:][path]filename Allows filenames to be renamed.
Replace
(external) Replace [drive:][path]filename [drive:][path] [/a][/p][/r][/s][/u][/w] Places files in the destination directory with files of the same name in the destination directory.
Restore
(external) Restore drive: [drive:][path]filename [/p][/s][/b:mm-dd-yy] [/a:mm-dd-yy][/e:hh:mm:ss] [/l:hh:mm:ss] [/m][/n][/d] Restores files that were backed up previously using the backup command.
Rmdir (rd)
(internal) Rmdir (rd) [drive:]path Deletes a directory after all files and subdirectories have been removed. See Deltree.
Set
(internal) Set (string1)=(string2) Displays, sets or removes, MS-DOS environment variables.
57
KemTec 2001-2003
Setver
(external) Setver [drive:]:path][filename (number)][/delete][/quiet] Used to display and modify the DOS version table. It can set the current version of dos to that which a program is designed to run on.
Share
(external) Share [/f:space] [/l:locks] Installs file sharing and file locking, allowing MS-DOS to validate all read and write requests from programs.
Shell
(internal) Shell=[drive:][path]filename [parameters] Used in config.sys to specify the name and location of the command interpreter that DOS should use. I.e. an alternative to command.com can be specified
Shift
(internal) Shift Changes the position of replaceable parameters in batch files.
Sort
(external) Sort [/r][/+n] < (filename) Sort [/r][/+n] > (filename2)
KemTec 2001-2003
58
Sorts reads input data and sorts and sends the result to the screen or to a file.
Stacks
(internal) Stacks=(number),(size) Used in config.sys to support the dynamic use of stacks to handle hardware interrupts.
Submenu
(internal) Submenu=blockname, [menutext] Used in config.sys to create a multilevel menu from which you can select start-up options.
Subst
(external) Subst drive: drive:path Subst drive: /d Allows a path to be treated as a virtual drive letter.
Switches
(internal) Switches= [/k][/f][/n][/w] Used in config.sys to force an enhanced AT keyboard to behave like a conventional keyboard.
Sys
(external) sys [source] drive: Copies the MS-DOS hidden system files and command.com to the disk in the drive you
59
KemTec 2001-2003
specify.
Time
(internal) Time hh:mm[:ss][.cc][a|p] Displays current time setting of the system clock and provides a way of resetting it.
Tree
(external) Tree [drive:][path] [/a][/f] Graphically displays the directory structure of a path.
Type
(internal) Type [drive:][path]filename Displays the contents of a file.
Undelete
(external) Undelete [drive:][path][filename] [/dt|/ds|/dos] Undelete [/list|/all|/purge[drive:]|/status|/load|/u|/s[drive:]|/tdrive:[-entries]] Restores files deleted with the del (erase) command.
Unformat
(external) Unformat drive: [/j][/l][/test][/partn][/p][/u] Restors a disk erased by the format command.
KemTec 2001-2003
60
Ver
(internal) Ver Displays the MS-DOS version number.
Verify
(internal) Verify on|off Verifys a that a recently copied file is saved properly to disk.
Vol
(internal) Vol [drive:] Displays the volume label of a disk.
Vsafe
(external) Vsafe [/option[+|-]...] [/ne][/nx][ax|/cx] [/n][/d][/u] Vsafe is a memory-resident program that continuously monitors your computer for viruses and warns the user if one is found.
Xcopy
(external) Xcopy [drive:][path]filename [drive:][path][filename] [/a][/drive:(date)] [/e][/m][/p][/s][/v] [/w][y\-y] Copies files and directories except hidden files and system files.
61
KemTec 2001-2003
NOTE: If you want more information on MS-DOS try the excellent 'Easy Dos' reference site at http://www.easydos.com
KemTec 2001-2003
62
63
KemTec 2001-2003