How to? Alias/Command line use of *log on/off


Jul 6, 2008
When I issue the command:
*log off & *dir /z /p * & *log on
I see a paged display of all the files in the current directory, with the expected pauses, between pages.
All is good if I allow the DIR display to complete without using the ESC option at a pause.

When I use ESC to interrupt the paged display. The "*log on" never gets executed, thus my log remains turned off.

Is there some method that will allow the above commands to complete running and turn the log on, no matter what happens during the DIR cmd?
An alias defined with the above behaves identically, as expected. I wrote a simple batch file to execute the *dir command and reset the log to ON and that appears to do what I want. OK, but was hoping this is also possible with an alias.
Even if you figure out a way to do it, you'll still wind up with a lot of "*log off" commands in your history.

Similar threads