pmkatz@axion.bt.co.uk (Philip Katz) (03/22/91)
I have only recently acquired a PC and am trying to get to grips with the lack of functionality of DOS compared with Unix, VAX/VMS etc :-( Question : I want to read in a value in a BATch file and then make a decision based on that value. E.g., in pseudo-code : . . . ECHO Do you want to do a backup, ANSWER$ IF ANSWER$ = "N" THEN GOTO nobackup PAUSE Place a backup disk in drive A: BACKUP C:\*.* A: :nobackup . . . Reading through the manuals I can find no way of doing this. Have I missed something, or is it not possible (in which case I suppose I need to write a C/Pascal/BASIC program to do it). Thanks in advance for any help. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: : Philip Katz, :: e-mail Katz_P_M@bt-web.bt.co.uk : : British Telecom Research Laboratories :: 'phone + 44 473 645672 : : RT1264, B68, Room 17, Martlesham Heath :: fax + 44 473 637550 : : Ipswich, Suffolk, England IP5 7RE :: : :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
ts@uwasa.fi (Timo Salmi) (03/25/91)
In article <1991Mar21.173724.2454@axion.bt.co.uk> Katz_P_M@bt-web.bt.co.uk writes: : > Question : I want to read in a value in a BATch file and then make a >decision based on that value. E.g., in pseudo-code : : There are very many "ask" programs around for this purpose. One of them is in /pc/ts/tsbat24.arc available by anonymous ftp from our site. And if you want to try other asks take a look in the /pc/batchutil directory at our site. ................................................................... Prof. Timo Salmi Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.12.37 School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun
mstr@vipunen.hut.fi (Markus Strand) (03/25/91)
In article <1991Mar21.173724.2454@axion.bt.co.uk> Katz_P_M@bt-web.bt.co.uk writes: > > I have only recently acquired a PC and am trying to get to grips >with the lack of functionality of DOS compared with Unix, VAX/VMS etc :-( > > Question : I want to read in a value in a BATch file and then make a >decision based on that value. E.g., in pseudo-code : ... > Reading through the manuals I can find no way of doing this. Have I >missed something, or is it not possible (in which case I suppose I need to >write a C/Pascal/BASIC program to do it). With vanilla DOS it's impossible to make an interactive batch file. You can either write a program or get an utility that has this feature. Almoust any batch extender has this feature. Look at simtel or funic for batutils. Markus Strand mstr@vipunen.hut.fi