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

rps

Jul 6, 2008
426
5
When I issue the command:
Code:
*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.