Encyclopedia

DOSkey

Also found in: Dictionary, Medical, Legal, Wikipedia.

DOSkey

An external DOS/Windows command that is used to display command history and create command macros (command shorthand).

DISPLAY COMMAND HISTORY
Run DOSkey with the number of commands to store, such as 200 in this example. Press F7 to display and Esc to close the history window.
        doskey /listsize = 200


CREATE AND USE COMMAND MACROS
The following example copies all the files in the current folder to the \BACKUP folder:
macro     doskey bk = copy *.* \backup
 enter     bk
 executes  copy *.* \backup


To accept input, add "$1" as follows:
macro     doskey bk = copy *.$1 \backup
 enter     bk gif
 executes  copy *.gif \backup


To view all the macros, enter:
       doskey /macros


SAVE THE MACROS
Macros last only for the current session. To use them again, save them in a batch file with the following command. Be sure to edit the file and add a doskey prefix to each line.
   doskey /macros > name_of_file.bat
Copyright © 1981-2025 by The Computer Language Company Inc. All Rights reserved. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher.
Mentioned in
References in periodicals archive
If you use the "DOS/Command Prompt" often, you might want to give DOSKEY a try.
If you use the ``DOS/Command Prompt'' often, you might want to give DOSKEY a try.
Senior Piano: Patrick Kreeger, North Carolina; Henry Doskey, teacher
Copyright © 2003-2025 Farlex, Inc Disclaimer
All content on this website, including dictionary, thesaurus, literature, geography, and other reference data is for informational purposes only. This information should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional.