Thanks, but that didn't work either (it gave the same 'not recognized' message).
However, I have managed to find the problem ..... (me!).
I had recently connected a backup drive that has the same layout as my main drive, and somehow the shortcut that contains my startup config and autorun script decided to update its path. So it was still pointing to the correctly named file, but on another drive. That's why everything still worked, but when I updated the cmd file on my main drive, those changes did not take effect (because an older version of the file was being used on another drive).
Anyway, I edited the shortcut to fix the path back to my main drive and the new 'lv' doskey command now works,
While I am here, I have another question about doskey that perhaps someone can shed light on for me.
I know that you can string things together in order to have a sequence of commands run from a doskey, but is it possible to recreate something like the code below without actually having to save into a separate file and then call that from the doskey. I prefer, whenever possible, to not have things scattered around in different files unless absolutely necessary (because things are more prone to breaking when they are reliant on other files that could get moved, renamed or deleted etc.)
Code: Select all
for /f %%A in ('"prompt $H &echo on &for %%B in (1) do rem"') do set BS=%%A
echo list volume > %temp%\listvol.txt
echo.
echo Disk Volume Information
echo. -----------------------
diskpart /s %temp%\listvol.txt | findstr "Volume ###" > %temp%\lvoutput.txt
echo.
type %temp%\lvoutput.txt | findstr /V /C:"Microsoft DiskPart"
echo.
Doskey is kind of fussy about things, so I doubt I could just daisy chain the command together and still have them work. I'm not particularly wedded to the method above, it's just that it's the only method I have for cleaning up command output (I prefer to see only the actual information and not all of the junk branding and copyright text which just clutters things up).
I have not been able to find any (intelligible) guides that show how to format or amend the outputted text of a command, so I'm stuck with the methods I have.