ts@uwasa.fi (Timo Salmi) (10/22/90)
Mon 22-Oct-90: I have updated my batch file collection to be /pc/ts/tsbat22.arc. PC-Magazine Vol 9 Num 14 published a batch to com file compiler bat2exec.com by Douglas Boling which is in the /pc/pd2/bat2ex13.zip package at chyde.uwasa.fi archives. As would be expected a batch compiler is more stringent in its requirements than MsDos. Consequently I have gone through the batches in my collection and seen to it that they are compilable. Note that in doing this I have not altered the tasks of the batch files, nor have I included the resultant compiled .com files. Where needed, I have just adjusted the batches to conform with bat2exec.com compiler requirements. Among others there is an addpath.bat batch for adding directories to the path without needing to rewrite the whole path as the ordinary path command would require. In a similar manner there is delpath.bat to omit a single directory from the path. Delpath.bat needs an auxiliary batch file called setvar.bat, which must be available to the delpath.bat. Delpath now checks whether the auxiliary setvar.bat file is available in the current directory or at path before running the rest of delpath.bat. When a batch contains a call to a program, the program must either be in the current directory, at path, or the call must contain the path to the program. The last method has the disadvantage of requiring adaptation to user's own structure. Therefore the most general method is having the necessary program(s) at path. If the program is not available, a normal batch ends in a "Bad command or file name" error message. This gives very little information of the cause of the problem. Therefore I have added routines in the batches to precheck that the required program(s) are indeed at path, and if not, issue a proper error message telling what exactly is awry. (The batch trick here is testing whether a given file is at path.) An additional note. Batches like delpath.bat cannot obviously be compiled successfully with bat2exec because of its need of an auxiliary batch. Another batch that works as a normal batch file, but won't work when compiled is color.bat. Color.bat sets the screen color attributes using ansi code. Bat2exec.exe compiler has similar problems with some other batches as well, but this does not affect the user of these batch files in any way. I have added blk.bat as an alternative simple screen saver to complement blank.bat. Blk.bat stores the screen before blanking and pops it when you exit the saver. TSBAT22.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 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 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 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 SCANZIP.BAT Scan for viruses (incl. lzexed) 10-22-90 11:19:18 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 10-22-90 11:39:20 TSBAT.NWS News concerning this package 10-22-90 11:34:56 TSPROG.INF List of PD programs from T.Salmi 10-13-90 09:14:26 UNPACK.BAT Unpack-test-view any archivetype 10-21-90 20:45:32 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 10-21-90 20:50:58 ---- ------ ------ ----- 0039 79815 45503 43% The wares are available by anonymous ftp from chyde.uwasa.fi, Vaasa, Finland, 128.214.12.3, or by using our mail server (use the latter if, and only if you don't have anonymous ftp). If you are not familiar with anonymous ftp or mail servers, I am prepared send prerecorded instructions on request (provided that your email address is reachable). ................................................................... 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