ts@uwasa.fi (Timo Salmi) (12/29/90)
Sat 29-Dec-90: I have programmed a fair number of MsDos batch files to make up a batch file collection of hopefully both useful and instructive bacthes. I have updated the collection to be version /pc/ts/tsbat23.arc by adding some new batches. ... FU.BAT is a poor man's function evaluator utilizing gwbasic that (usually) belongs automatically to the MsDos delivery. The basic idea (pardon the pun) of combining batch and gwbasic programming is not really mine. I got it from the PC-Magazine. The code of this batch, however, is entirely due to yours truly. ... ASK.EXE is a common batch file enhancer returning as errorlevel the ascii value of the first character of the user's response. An example of a simple batch utilizing ASK: echo off ASK Yes or no? /d /u if errorlevel==89 if not errorlevel==90 echo It was a yes if errorlevel==78 if not errorlevel==79 echo It was a no echo on My ask has switches for lower case (/l) and upper case (/u) conversions, and (/d) "direct" reads without needing to press the enter key. The ask prompt may include escape sequences for ansi graphics. This is a feature not always available in other ask programs. Ok, there are countless ask batch enhancers already around, so why yet another. Simply so that then tsbat23.arc has it, and you don't have to get one separately. Furthermore, this ask is both simple and general enough to be easy to use while being still flexible. BTW, ask is the one command which the original MsDos batch programming most conspicuously lacks and needs. So many other seemingly lacking features are imbedded in MsDos, and you just have to ferret them out. That's partly what tsbat23.arc collection is about. ... SAFEDEL.BAT is a generalized bacth for deleting files. It asks for confirmation for each file to be deleted. The usage is SAFEDEL [FileName1] [FileNam2] ... and wildcards are allowed. ... MENU.BAT show show to build menus for easy program selection by the user. This batch utilizes ask.exe, and is livened up by ansi graphics. ... UNPACK.BAT has been updated. It extracts, tests, and views packed files (archives) irrespective of the packing method. The update handles also .arj files (the new arrival sent packing on the scene). If you don't know how to obtain files from uwasa.fi archives, you can email me for the prerecorded instructions. TSBAT23.ARC Batch file collection, T.Salmi Filename Comment Date Time -------- -------------------------------- ---- ---- ADDPATH.BAT Append directories to the path 10-21-90 17:44:06 APATH-OM.BAT Otto Makela's version of addpath 01-13-90 12:32:30 ARC2ZIP.BAT Single .arc to .zip with comment 10-21-90 11:11:02 ASK.EXE Ask questions in a batch file 12-29-90 13:50:10 BLANK.BAT Poor man's screen saver 03-28-90 10:42:54 BLK.BAT Poor man's screen saver & popup 10-21-90 19:51:38 C.BAT Lazy changing of directory 03-14-90 15:39:46 COLOR.BAT Set screen color attributes 10-21-90 20:00:02 D.BAT Directory with sort & wildserach 10-21-90 20:09:32 DAILY.BAT Run a program only once a day 10-21-90 20:11:52 DELDIR.BAT Remove directory and its files 10-21-90 20:14:14 DELPATH.BAT Delete a directory from the path 10-21-90 18:34:30 FU.BAT Poor man's function evaluator 12-25-90 18:45:22 LASTBOOT.BAT Show date + time of previos boot 10-21-90 20:22:12 LINK1.BAT How to link batch files together 10-31-89 14:26:14 LINK2.BAT Batch link demo's second file 11-15-89 12:23:24 LOCATE.BAT Wildcard file find 01-14-90 11:22:56 LOGRUN.BAT Log program usage & time and run 04-15-90 22:46:54 M.BAT Give multiple MsDos commands 03-04-90 11:08:08 MAKESURE.BAT Simple command.com virus warning 01-14-90 11:54:56 MENU.BAT Run programs from a menu 12-29-90 16:55:30 POPDIRE.BAT Restore (pop) saved directory 01-14-90 11:57:14 POPPATH.BAT Restore the saved path 01-14-90 11:59:44 PUSHDIRE.BAT Non-resident push directory 01-14-90 11:58:18 PUSHPATH.BAT Save the current path 01-14-90 11:58:44 RUN.BAT Testing for viruses 01-14-90 12:11:24 SAFEDEL.BAT Safe delete of files 12-28-90 18:53:46 SAFEDEL1.BAT Auxiliary batch to safedel.bat 12-28-90 19:01:28 SCANZIP.BAT Scan for viruses (incl. lzexed) 10-23-90 10:48:08 SCOPY.BAT Copy a file with a single device 06-28-90 12:09:08 SETCOM.BAT Secure your command.com 10-28-89 19:41:08 SETPUSHD.EXE Program for nonresident pushdire 01-13-90 17:33:42 SETVAR.BAT Sets a variable for delpath.bat 01-15-90 22:19:38 SHOW.BAT Wildcard multifile type command 10-21-90 20:40:20 SHOW1.BAT Auxiliary batch for show.bat 06-01-90 06:07:08 TSBAT.INF Document 12-29-90 17:16:44 TSBAT.NWS News concerning this package 12-29-90 14:16:06 TSPROG.INF List of PD programs from T.Salmi 12-02-90 16:28:46 UNPACK.BAT Unpack-test-view any archivetype 12-28-90 19:30:56 VAASA.INF Info: Finland, Vaasa, U of Vaasa 02-02-90 11:52:54 VIRUS.BAT Another batch-based virus test 10-21-90 20:47:04 WHERE.BAT Generic searchstring fname find 10-21-90 20:48:26 ZIPDATE.BAT Equate .zip date to latest file 01-10-90 22:49:00 ZOO2ZIPH.BAT Single .zoo to .zip on harddisk 12-20-90 12:21:30 ---- ------ ------ ----- 0044 98181 57051 42% ................................................................... Prof. Timo Salmi (Moderating at anon. ftp site 128.214.12.3) School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun