1

I wanted to clear the history of typed command lines,

So I called DOSKEY /REINSTALL as explicitly told in the help, but then, my command prompt closed !

Isn't this the right way to clear the history of typed command lines ?

aybe
  • 313

1 Answers1

1


I suggest visiting this post .: Multi-line menu with options selection via DOSKEY

...doskey handle two buffers, the buffer of the doskey macros, and the buffer of the commands history. Apparently doskey /reinstall not works, it reset any buffer. Also /history show anything even when you see commands with F7...


Just try using:

%__APPDIR__%doskey.exe /listsize=0 && %__APPDIR__%doskey.exe /listsize=50 

This will reset your doskey history

%__APPDIR__%doskey.exe /listsize=0
%__APPDIR__%doskey.exe /listsize=50

rem ::  or...
%__APPDIR__%doskey.exe /listsize=0 && %__APPDIR__%doskey.exe /listsize=50

For additional, about your prompt closed !...

Verify if there is some bat/cmd with same name: DOSKEY.cmd DOSKEY.bat

%__APPDIR__%where.exe /r \ doskey.*
  • Use the full path/name to %__APPDIR__%DOSKEY.exe instead only DOSKEY /REINSTALL
doskey.exe /reinstall
%__APPDIR__%doskey.exe /listsize=0 && %__APPDIR__%doskey.exe /listsize=50

Obs.: Try running doskey.exe (with the full path), from one of the command line outputs below, it may be the doskey.exe file in c:\windows\system32 maybe corrupted...

%__APPDIR__%where.exe /r \ doskey.*
Io-oI
  • 9,237