Ana səhifə

Appendix e: ms-dos


Yüklə 0.5 Mb.
səhifə2/8
tarix25.06.2016
ölçüsü0.5 Mb.
1   2   3   4   5   6   7   8

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.

Here the parameter to be deleted is the file myfiles.doc:



Del myfiles.doc


Command Parameter


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

SYNTAX


You must enter commands, parameters and switches accurately to get the correct result from the command processor.

Command Syntax and punctuation





  • Brackets In the command list at the end of this appendix, any items enclosed in square brackets are optional, i.e. the command will work in its basic form without entering anything in the brackets.

  • Command Name The DOS command name is always entered first before any parameters or switches but it is not case sensitive. You can use upper or lower case or even combinations of both. The command name must be followed by a space.

  • Drive Designation Several disk access commands require a drive designator shown as the option "drive:" in the following command list. The colon ‘:’ following the drive designator must also be used, it cannot be omitted. Note: If the parameters you are using are in the current directory you can omit the drive designator and colon.

  • Filename A filename is the name of a file stored on disk. In MS-DOS, unlike Windows 98/ME/2000, a filename can only be eight or less characters long followed by an optional three character extension. The extension can be used after the filename to identify its type, e.g. exe means an executable file. The extension must follow a period ‘.’ and must be three characters or less.

  • Pathname You use pathnames to indicate the route the command processor must follow from the current directory to reach the required parameters. The MS-DOS directory structure is really the same as the folder structure in Windows, i.e. directories and folders are synonymous.

C:\ (root directory)

DOS Myphotos Mydocs Myprogs Utils

Hols Business Home Office Home (sub directories)

1999 2000 Current Archived


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.

HOW TO LEARN DOS COMMANDS



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.


TO RUN OLD MS-DOS HELP FROM YOUR WINDOWS 95/98/ME CD:





  1. Go to the MS-DOS command prompt (i.e. click Start, highlight Programs, then click MS-DOS Prompt.) (In windows ME this is in the accessories folder)

  2. At the command line, enter CD d:\tools\oldms-dos where ‘d‘ is the CD-ROM drive letter containing your Windows 95/98/ME Installation CD. Then type help to run the MS-DOS Help program.



COMMANDS AVAILABLE IN WINDOWS 95/98/ME/2000


Apart from these original dos help files accessible from the oldmsdos directory on the CD-ROM drive, Windows 95/98/ME/2000 has a subset of MS-DOS commands.3 These run in the Windows environment from the Command Line. To get help on these commands do the following:
In Windows 95/98/ME : Go to the MS-DOS command prompt (i.e. click Start, highlight Programs, then click MS-DOS Prompt.) (In Windows ME this is in the assessories folder)
In the MS-DOS Prompt window, type the command name you want help with and then enter a space followed by /?. For example, to find help on the deltree command simply type deltree /? then press the enter key.




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 /?.
1   2   3   4   5   6   7   8


Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©atelim.com 2016
rəhbərliyinə müraciət