Adding a new DosKey command
Posted: 23 Oct 2023 13:53
I have an 'autorun' script that gets called whenever I start a cmd session. In this file I have (among other things) various doskey commands such as:
I set them up ages ago, and they have all been working great ever since, so I thought that it would be trivial to add a new command by just copying the format of the existing doskey entries (I should have known that things can never be that simple).
All I wanted to do was to have lv run this command:
I tried: but all I get is: 'lv' is not recognized as an internal or external command
I tried numerous variations, but to no avail.
Code: Select all
doskey dh=echo(^&dir /a:h /o:g
doskey sid=echo(^&wmic useraccount get name,sid
doskey dkh=echo(^&doskey /history ^| more
doskey fon-=echo(^& echo Fonts folder is 'disabled' ^& attrib -s -r c:\windows\fonts
doskey fon+=echo(^& echo Fonts folder is 'enabled' ^& attrib +s +r c:\windows\fonts
....
etc,
All I wanted to do was to have lv run this command:
Code: Select all
echo list volume | diskpart
Code: Select all
doskey lv=echo(^& echo list volume ^| diskpart
I tried numerous variations, but to no avail.