Link:http://output.to/sideway/default.asp?qno=110700164 DOSKEY MS DOS Command: DOSKEY.COMReference from Microsoft MS-DOS cmd help DescriptionLoads the Doskey program into memory. The Doskey program recalls MS-DOS commands and enables you to edit command lines and create and run macros. Doskey is a memory-resident program. When installed, Doskey occupies about 3 kilobytes of resident memory. SyntaxDOSKEY [/REINSTALL] [/BUFSIZE=size] [/MACROS] [/HISTORY][/INSERT|/OVERSTRIKE] [macroname=[text]] To start the Doskey program and use the default settings, use the following syntax: DOSKEY Parameters
RemarksRecalling a command To recall a command, you can use any of the following keys after loading Doskey into memory:
Editing the command line With the Doskey program, you can edit the current command line. The following list describes the Doskey editing keys and their functions:
Specifying a default insert mode If you press the INSERT key, you can type text on the Doskey command line in the middle of old text without replacing the old text. However, once you press ENTER, Doskey returns your keyboard to replace mode. You must press INSERT again to return to insert mode. The /INSERT switch puts your keyboard in insert mode each time you press ENTER. Your keyboard effectively remains in insert mode until you use the /OVERSTRIKE switch. You can temporarily return to replace mode by pressing the INSERT key; but once you press ENTER, Doskey returns your keyboard to insert mode. The cursor changes shape when you use the INSERT key to change from one mode to the other. Creating a macro You can use the Doskey program to create macros that carry out one or more MS-DOS commands. You can use the following special characters to control command operations when defining a macro:
For example, to create a macro that performs a quick and unconditional format of a disk, type the following command: doskey qf=format $1 /q /u For information about quick and unconditional formatting, see the FORMAT command. You can use the DOSKEY command in a batch program to create a macro. Running a macro To run a macro, type the macro name starting at the first position on the command line. If the macro was defined with $* or any of the batch parameters $1 through $9, use a space to separate parameters. You could run the QF macro created in the previous example to format a disk in drive A quickly and unconditionally. To do so, you would type the following command: qf a: You cannot run a macro from a batch program. Creating a macro with the same name as an MS-DOS command You might want to create a macro that has the same name as an MS-DOS command. This can be useful, for example, if you always use a certain command with specific switches. To specify whether you want to run the macro or the MS-DOS command, follow these guidelines:
Deleting a macro To delete a macro, type the following command: doskey macroname= ExamplesThe /MACROS and /HISTORY switches are useful for creating batch programs to save macros and commands. For example, to create a batch program named MACINIT.BAT that includes all Doskey macros, type the following command: doskey /macros > macinit.bat To use the MACINIT.BAT file, edit it to include the DOSKEY command at the beginning of each macro line. To create a batch program named TMP.BAT that contains recently used commands, type the following command: doskey /history > tmp.bat To define a macro with multiple commands, use $T to separate commands, as follows: doskey tx=cd\temp$tdir/w $* In the preceding example, the TX macro changes the current directory to TEMP and then displays a directory listing, using the wide display format. You can use $* at the end of the macro to append other switches to the DIR command when you run TX. The following macro uses a batch parameter for a new directory name. The macro first creates a new directory and then changes to it from the current directory. doskey mc=md $1$tcd $1 To use the preceding macro to create and change to a directory named BOOKS, type the following: mc books To create a macro that uses batch parameters for moving a file or group of files, type the following command: doskey mv=copy $1 $2 $t del $1 To create a macro that causes the MEM command to pause after each screen, type the following command: doskey mem=mem $* /p Link:http://output.to/sideway/default.asp?qno=110700163 DOS MS DOS Command: DOSReference from Microsoft MS-DOS cmd help DescriptionSpecifies that MS-DOS should maintain a link to the upper memory area, load part of itself into the high memory area (HMA), or both. You can use this command only in your CONFIG.SYS file. SyntaxDOS=HIGH|LOW[,UMB|,NOUMB] DOS=[HIGH,|LOW,]UMB|NOUMB Parameters
Related CommandsFor information about loading a device driver into the upper memory area, see the DEVICEHIGH command. For information about loading a program into the upper memory area, see the LOADHIGH command. RemarksMust install HIMEM.SYS for DOS=UMB or DOS=HIGH You must install the HIMEM.SYS device driver or another extended memory manager before you specify either DOS=UMB or DOS=HIGH. Using the UMB parameter You must specify the DOS=UMB command in order to load programs and device drivers into the upper memory area. Using the upper memory area frees more space in conventional memory for programs. In addition to using this command, you must install an upper-memory-block (UMB) provider. If your computer has an 80386 or 80486 processor, you can use EMM386.EXE for your UMB provider. If you specify DOS=UMB and no UMB provider is installed, MS-DOS will not display an error message. Using the HIGH parameter If you specify the HIGH parameter, MS-DOS attempts to load part of itself into the HMA. Loading part of MS-DOS into the HMA frees conventional memory for programs. If you specify DOS=HIGH and MS-DOS is unable to use the HMA, the following message will appear: HMA not available Loading DOS low Combining parameters You can include more than one parameter on a single DOS command line, using commas to separate them. For example, the following command lines are valid: dos=umb,low dos=high,umb You can place the DOS command anywhere in your CONFIG.SYS file. Link:http://output.to/sideway/default.asp?qno=110700162 DISPLAY.SYS MS DOS Command: DISPLAY.SYSReference from Microsoft MS-DOS cmd help DescriptionEnables you to display international character sets on EGA, VGA, and LCD monitors. This device driver must be loaded by a DEVICE or DEVICEHIGH command in your CONFIG.SYS file. For an introduction to preparing your screen and keyboard for character sets, see the chapter "Customizing for International Use" in the MS-DOS User's Guide. SyntaxDEVICE=[drive:][path]DISPLAY.SYS CON[:]=(type[,[hwcp][,n]]) DEVICE=[drive:][path]DISPLAY.SYS CON[:]=(type[,[hwcp][,(n,m)]]) Parameters
RemarksUsing DISPLAY.SYS with monochrome or CGA display adapters Because monochrome and CGA display adapters do not support character set switching, using DISPLAY.SYS with either type of adapter has no effect. Installing a third-party console driver If you install both DISPLAY.SYS and a third-party console driver, such as VT52.SYS, the third-party device driver must be installed first. Otherwise, the third-party device driver may disable DISPLAY.SYS. ExamplesSuppose you want DISPLAY.SYS to support an EGA display adapter with the United States hardware character set (437) and the potential for two additional MS-DOS character sets. To do this and to specify that DISPLAY.SYS is in the DOS directory on drive C, add the following line to your CONFIG.SYS file: device=c:\dos\display.sys con=(ega,437,2) |
Sideway BICK Blog 25/07 |