Any help would be appreciated.
Guy
It appears from your message headers that you are using WinNT.
NT-related questions are best addressed to the alt.msdos.batch.nt
newsgroup.
Soon and Sleep are part of the WinNT Resource Kit. You can
obtain a replacement for Soon ('Rsoon' - a batch file) at
click on 'NT Reg Hacks' and search for 'Rsoon'.
To have a batch job repeat every five minutes, you would add
the following to the logical end of your existing batch file:
call RSOON 300 %comspec% /c "%~f0 %*"
--
Phil Robyn
Univ. of California, Berkeley
u n z i p m y a d d r e s s t o s e n d e - m a i l
What am I doing wrong? Thanks again
According to your message headers, you are using NT. NT-related questions
should be posted to the alt.msdos.batch.nt newsgroup. Choice does not
'come standard' with NT; it's included in the Resource Kit. Also, the
maximum amount of time that you can delay with Choice is 99 seconds anyway.
People will tell you that you can use Choice from Win9x, etc., etc.,
but experience proves that no version of Choice works reliably on NT,
especially when used to implement a delay (as opposed to its original
purpose of accepting a single keystroke). A single invocation of
Choice may work as intended; but since NT is a true multi-tasking
environment, once you start writing batch files that use Choice, either
interactively to accept keystrokes or non-interactively to effect time
delays, you will soon discover that multiple concurrent invocations of
Choice will simply clobber each other.
If you want to run a batch file once every so many minutes, just put
the following at the logical end of your batch file:
SOON (number of seconds) %comspec% /c "%~f0 %*"
So when you run it the first time, it will then reschedule itself to
run again in (number of seconds). By the way, you must start the
Scheduler Service to be able to do this; type the command
net start schedule
at the CMD prompt.
SOON is also in the Resource Kit. If you don't have the Resource Kit,
you can download a freeware replacement for SOON (RSOON) from
http://www.jsiinc.com - click on NT Reg Hacks and search for RSOON.
In which case, you would put at the logical end of your batch file
RSOON (number of seconds) ....
There is documentation for RSOON at jsiinc.
'The name specified is not recognised as an internal...' suggests your
shell is cmd and that your OS is NT. choice is not supplied by default
in that environment. A W9X choice file is portable to NT and the
question of choice in NT has already been asked many times. I would give
a better answer if I had it. I suggest you research an answer at
http://groups.google.com/advanced_groups_search
I have no immediate interest in such an answer. Such an answer may
appear here anyway within a couple of days. You or I may also get flames
suggesting the question is not topical.
I CAN tell you that the parameter to choice is limited to 99 seconds.
You may also like to look at Windows Script Host unless you are
committed to DOS technology.
--
Walter Briscoe
There also is a clone
ftp://garbo.uwasa.fi/pc/ts/tsutlf16.zip Sixth set of Utilities, T.Salmi
Filename Comment Date Time
-------- -------------------------------- ---- ----
ADVDATE.EXE Advance system clock's date Jan-31-2000 07:16:48
CHOOSE.EXE Ask questions in batch files Jan-31-2000 07:17:16 <---
CHTEST.BAT An example of using CHOOSE.EXE Aug-07-1993 14:17:54
DELEDIR.EXE Generalized delete directory Jan-31-2000 07:19:06
FILE_ID.DIZ Brief characterization of TSUTLF Jan-31-2000 07:14:20
GOTODIR.EXE Generalized change directory Jan-31-2000 07:20:20
MAKEDIR.EXE Generalized create directory Jan-31-2000 07:20:50
STRINGS.EXE Find a file's embedded strings Jan-31-2000 07:21:50
STRMEMO.EXE Find strings in your PC's memory Jan-31-2000 07:23:24
TSPROG.INF List of programs from Timo Salmi Jan-20-2000 12:21:36
TSUTLF.INF Document (a readme) Feb-01-2000 06:36:38
TSUTLF.NWS News announcements about tsutlf Feb-01-2000 06:37:22
VAASA.INF Info: Finland, Vaasa, U of Vaasa Oct-18-1997 13:18:46
---- ------ ------ -----
0013 116890
All the best, Timo
--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Timo's FAQ materials at http://www.uwasa.fi/~ts/http/tsfaq.html
sorry to bother you, but it suddenly came into my mind: i would prefer
to have in the time-column some filesize-column instead. I believe time
is less important for the reader (as date is given), although it
concerns certainly compact files, it may be more informative, and even
be an asset against the standard tool (amongst others).
Just some thinking here. (yes i saw/know, size of zip is given)
and even wondering why i even suggest it.
--
Lieve - Ri(n)ksken(s)
TUF Greetings from Rumbeke, Belgium
Please use only 1 e-mail adress if reply !
: People will tell you that you can use Choice from Win9x, etc., etc.,
: but experience proves that no version of Choice works reliably on NT,
: especially when used to implement a delay (as opposed to its original
: purpose of accepting a single keystroke). A single invocation of
: Choice may work as intended; but since NT is a true multi-tasking
: environment, once you start writing batch files that use Choice, either
: interactively to accept keystrokes or non-interactively to effect time
: delays, you will soon discover that multiple concurrent invocations of
: Choice will simply clobber each other.
I've verified this by running CHOICE.EXE with the /t option in two command
windows. The one started first never times out, although it will respond
to a keystroke. Does CHOICE work correctly in this situation under Win
99/98/Me?
--
Gary L. Smith g...@infinet.com
Columbus, Ohio
Yes. If you invoke several "choice /c:d /td,nn>NUL" instances, each runs
to completion separately in the expected time (according to nn = 1 - 99).
However, default CPU usage by each is high, and the rest of the system
suffers a great deal if you run several. At the very least, each instance
needs its own .PIF with idle sensitivity tuned to fairly high (but _not_ the
maximum, or they will all stop/lose time as soon as they lose focus).
It's certainly not the best way to implement delays, but it's a handy kludge
for odd occasions for the process with focus.
--
William Allen
"William Allen" <ma...@mayfly13.fsnet.co.uk> wrote in message
news:9g4dho$75enp$1...@ID-55970.news.dfncis.de...