PCBOARD is a registered trademark of Clark Development Company, inc. *:::::::::::::::::::::::::::[ DISCLAIMER ]:::::::::::::::::::::::::::::::::* DOWNTIL.EXE by Bill Shields is released to public domain. DOWNTIL.EXE is provided AS IS without any warranty, expressed or implied. This includes without limitation the fitfulness to a particular purpose or application and any warranties of merchantability. While I tried to be as thorough as possible while debugging DOWNTIL.EXE, I shall not be liable for any damages, whether direct, indirect, special, or consequential arising from a failure of DOWNTIL.EXE to operate in a manner desired by the user. I shall not be liable for any damage to data or property which may by caused directly or indirectly by use of DOWNTIL.EXE. In no event will I be liable to you for any damages, including any lost profits, lost savings or other incidental or consequential damages arising out of your use or inability to use the program, or for any claim by any other party. *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: DOWNTIL.EXE was created after I got tired of having to switch between two keyboards when I needed to have the nodes down (and up and down and up; I'm setting up and testing...). Basically, DOWNTIL.EXE helps keep node(s) down until the specified filenames are found, in my case I had just one filename so I only had to create one file to bring my node(s) back up. SYNTAX: DOWNTIL [path] filename [[path] filename] [/O]... /O .... When DOWNTIL sees all of the files specified on the command line it instantly returns to BOARD. This posed a problem when all the files existed prior to running the program. If I neglected to remove the file and attempted to exit PCBoard it would find the program and throw me back into PCBoard. I added a 30 second delay that permits me (and you) to hit ESC to drop to DOS, after 30 seconds it goes back to PCBoard. During an event, where we want all the files to be present, I found this 30 second delay a time waster so I added an override feature. If /O is specified and all files are present the program will immediately return you to PCBoard. EXAMPLE: DOWNTIL P:\PCB\ND_1 P:\PCB\ND_2 P:\PCB\ND3 In the above example this particular node would be stuck on this batch file statement until all three files were present. Line #5 in the BOARD.BAT file below shows how these three files are made available. ----------- I can now bring the node(s) down from PCBoard (menu item #14) and I only have to run a short batch file to bring everything back up (the batch file creates the file specified on DOWNTIL's command line). Bear in mind that the following sample files apply to my situation where I want to be able to bring up downed node(s) from any client station. I mention this because PCBoard returns a errorlevel 0 on a node forced down. An event on the other hand will not return a level 0. In the case of an event DOWNTIL would need to be place in the event file. //:::::::::::::::::::::::::[ BOARD BATCH FILE ]::::::::::::::::::::::::::::: //:::::::::::::::::::::::::[ BOARD BATCH FILE ]::::::::::::::::::::::::::::: //:::::::::::::::::::::::::[ BOARD BATCH FILE ]::::::::::::::::::::::::::::: 1 @ECHO OFF 2 3 :BOARD 4 echo Loading PCBoard... 5 echo NODE #%NODE% IS RUNNING > P:\PCB\ND_%NODE% 6 7 P: 8 CD \PCB\NODE%NODE% 9 SET PCB= 10 SET DSZLOG=PCBDSZ.LOG 11 12 IF EXIST REMOTE.BAT RENAME REMOTE.BAT REMOTE.SYS 13 IF EXIST DOOR.BAT DEL DOOR.BAT 14 IF EXIST ENDPCB DEL ENDPCB 15 PCBOARDM 16 IF EXIST REMOTE.BAT REMOTE 17 IF EXIST DOOR.BAT DOOR 18 IF EXIST EVENT.BAT EVENT 19 IF EXIST ENDPCB GOTO NODES 20 BOARD 21 22 :FileCheck 23 DOWNTIL P:\PCB\BOOTUP 24 if errorlevel 3 if not errorlevel 4 goto board 25 goto end 26 :NODES 27 if exist P:\PCB\ND_%NODE% del P:\PCB\ND_%NODE% 28 if errorlevel 0 if not errorlevel 1 goto FileCheck 29 :END Line 19 goes to :NODES instead of the normal label (:END). If a node file exist it deletes it. Since this file is created when coming into PCBoard and deleted upon exiting it provides a means to the system (and DOWNTIL) to figure out which nodes are down or up. I should note that each nodes autoexec.bat file contains a SET NODE=number statement. Once the node file is deleted, line 28 traps an errorlevel 0. If a higher level is generated the program will continue processing without interference. If on the otherhand a errorlevel 0 was trapped then it does a file check (line #23). An errorlevel of 3 from DOWNTIL means that BOARD.BAT should be executed again. Errorlevel 1 means DOWNTIL generated and error and Errorlevel 2 indicates that a drop to DOS was requested. //:::::::::::::::::::::::[ DEMO EVENT BATCH FILE ]::::::::::::::::::::::::::: //:::::::::::::::::::::::[ DEMO EVENT BATCH FILE ]::::::::::::::::::::::::::: //:::::::::::::::::::::::[ DEMO EVENT BATCH FILE ]::::::::::::::::::::::::::: 1 :DEMO.BAT 2 echo. > P:\PCB\BOOTUP 3 downtil /O P:\PCB\ND_1 P:\PCB\ND_2 4 del P:\PCB\BOOTUP 5 board I used this batch file in conjunction with the above BOARD.BAT to test the program. I would use option #14 from PCBoards menu to down a node. I then ran the above batch file from a different node. Line #2 would allow the downed node(s) to find the file specified on their DOWNTIL's command line and thus allow them to run board.bat. Line #5 of board.bat would generate the P:\PCB\ND_%NODE% file looked for by line #3 of the demo event file. If all went well all the nodes would generate their own node files allowing DOWNTIL (line #3) to continue on to line #4. Line #4 removes the P:\PCB\BOOTUP file. If we did not remove this all of the nodes would see it the next time they where brought down which would cause them to cycle back into PCBoard (after the 30 second delay). I used the /O (override) on line #3 because we expect all the files presented on the command line to be available and this will allow the batch file to proceed onto line 4 with no delay. ---------------------------- --->THE KID<---