Share on Facebook Share on Twitter Email
Answers.com

DOS Doskey

 

An external command starting with DOS 5 that provides command history and macros (typed-in commands stored for later use). The command buffer (reserved space) is 512 bytes long unless you specify otherwise. Three examples for loading Doskey follow:

    doskey                 512 byte buffer
    doskey /bufsize=1000   1K buffer
    doskey /bufsize=256    minimum size

Use Up and Down Arrow to move through command history, and press Page Up and Page Down for the oldest and most recent command. Doskey uses these additional key commands:

   Key       Function
   F7        Display command history
   Alt-F7    Clear command history
   Alt-F10   Clear macros
   F9        Recall command by number
   Ctrl <--  Cursor previous word
   Ctrl -->  Cursor next word
   Home      Cursor beginning of line
   End       Cursor end of line
   Esc       Clear line
   Ins       Insert mode for this line

CREATING MACROS

Doskey macros are useful for shortening phrases that are hard to type; for example, suppose you often copy the file D:\PKWARE\PKUNZIP.EXE to different directories or disks. You could create a macro named PK as follows:

   doskey pk = copy d:\pkware\pkunzip.exe $1

The $1 creates a blank field for data entry. Now that the macro is created, to copy PKUNZIP.EXE to the B drive, you would type:

            pk b:

Entering the command above converts the macro into the following command (the b: replaces the $1):

    pk = copy d:\pkware\pkunzip.exe  b:

To see the macros you've created, type:

            doskey /macros

Doskey macros last for only the current session. If you save them in a batch file and add the word DOSKEY in front of each one, you can execute the batch file and recreate the macros in the next session. To store your macros in MYMACRO.BAT, type:

       doskey /macros > mymacro.bat

In order to make the resulting file a command file, you have to type the word DOSKEY at the beginning of each line.

Download Computer Desktop Encyclopedia to your iPhone/iTouch

Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
 
 
Learn More
history (technology)
DOS 5 (technology)
DOS AUTOEXEC.BAT (technology)

What dos the ozone do? Read answer...
How do you get out of dos mode? Read answer...
What is a DoS attack? Read answer...

Help us answer these
What is the dos in laboratory?
When was DOS made?
How was DOS invented?

Post a question - any question - to the WikiAnswers community:

 

Copyrights:

Computer Desktop Encyclopedia. THIS COPYRIGHTED DEFINITION IS FOR PERSONAL USE ONLY.
All other reproduction is strictly prohibited without permission from the publisher.
© 1981-2009 Computer Language Company Inc.  All rights reserved.  Read more