Simplify Command Entry with Doskey Macros


The Doskey utility lets you encapsulate command strings as easy-to-enter macros. For example, by typing the following at the command prompt: 
doskey 50=mode con:lines=50 

you create a macro named 50 that executes the command string mode con:lines=50.To run a macro, you simply enter its name (in this example, 50) at a command prompt. You can create as many macros as you like with Doskey, but your macros are effective only for the current Command Prompt session. 

To create a reusable set of Doskey macros, save them in a plain-text file, using an editor such as Notepad. Then load them from the command prompt, using Doskey’s /Macrofile switch. For example, if your macros are stored in your profile folder in a file named MyMacros.txt, typing: 

doskey /macrofile=%userprofile%\mymacros.txt

makes those macros available for the current Command Prompt session. And if you regularly use the same macro file, you might want to consider using the AutoRun feature to load your macros. 

For more information about using Doskey, type doskey /? at the command prompt. 

Read 211 times


I love my computer because all my friends live inside it

Welcome to AustinLaptop.Com

We use cookies to improve our website. By continuing to use this website, you are giving consent to cookies being used. More details…