On 7 Sep 99, at 10:19, Anil Chawla wrote:
> 1) I wish to create a Dos batch file which displays "The current time in
> format "hh:mm" ". How do I achieve that? If I use "prompt$T", it displays
> the time in hh:mm:ss. I do not wish to display the seconds.
The usual way I've done this is
prompt $T$H$H$H ...
That is, show the time with $T, and then backspace over the seconds. This
happens fast enough that the user will never see them.
> 2) I wish to create a batch file, which displays files in a directory. If
> the list has more than 6 files, the info will scroll off the screen. I wish
> to control scrolling using "controlS/control Q". How do I incorporate this
> feature in the batch file?
I believe ^S/^Q, or something very similar, actually works already --
except that the output scrolls by faster than the user can press these keys.
As a better option, try redirecting the output of your DIR command through
the MORE command:
dir [options...] | more
or
dir >dir.out
more <dir.out
David G
Curious about the people moderating your
messages? Visit our staff web site:
http://nospin.com/pc/staff.html
|