How can I configure the command line history, DOSKEY?
April 27, 2000
A. In olden DOS days a utility was available, DOSKEY.EXE, whichenabled the user to cycle through previous commands. In NT this is enabled bydefault and you can cycle through old commands however DOSKEY has otherabilities.
To clear the current command line history use command:
doskey /reinstall
You can also optionally tell it how many old commands to keep with the /listsizeparameter
doskey /reinstall /listsize=50
would keep 50 old commands.
Its also possible to create macros which allow you to assign a complexcommand to a single word, for example
doskey dird=dir /ad
Would create a macro dird which only lists directories.
Its also possible to assign a macro to a specific command level applicationusing the /exename switch, for example
doskey /exename=nslookup.exe sets=server 10.129.210.71
Entering sets in NSLOOKUP would now set the server to 10.129.210.71. To viewcurrent macros for an image use
doskey /exename= /macros, for example
C:> doskey /exename=nslookup.exe /macros sets=server 10.129.210.71
About the Author
You May Also Like