This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== BOARD.BAT ====== For PCBoard to function normally, you need to use BOARD.BAT to load each node on your system. This batch file provides the logic that allows PCBoard to exit out of memory, load a door application or event, and return where the caller left off from. ===== Sample ===== The BOARD.BAT that came with your copy of PCBOARD probably resembles this example: @echo off c: cd\pcb set PCB= set dszlog=pcbdsz.log if exist remote.bat rename remote.bat remote.sys if exist door.bat del door.bat if exist endpcb del endpcb pcboard if exist remote.bat remote if exist door.bat door if exist event.bat event if exist endpcb goto end board :end ==== Detailed Explanation ==== To help better understand the flow and structure of the BOARD.BAT file, this section breaks it down into three sections. Each section shows a portion of the batch file and proceeds to explain each line in detail. === Preparing To Executing PCBoard === @echo off c: cd\pcb set PCB= set dszlog=pcbdsz.log if exist remote.bat rename remote.bat remote.sys if exist door.bat del door.bat if exist endpcb del endpcb - This DOS batch file command will prevent each line from displaying on screen as it is executed. - Changes to the C: drive. - Changes to the PCB subdirectory. - Defines the PCB environment variable. If you want to use any of PCBoard's environment switches you must add them to this line. - Defines the DSZLOG environment variable. Several external protocols will read this environment variable to determine where to log the files that are transferred. Considering that PCBoard also reads this environment variable on external batch transfer protocols it is very important to have this variable properly defined. - Checks the current directory to see if REMOTE.BAT exists. If it does, delete it to prevent it from accidentally being executed by another caller. This file is created by PCBoard from your REMOTE.SYS file. Because the REMOTE.SYS file remains on disk, this file can be deleted. - Checks the current directory to see if DOOR.BAT exists. If it does, delete it to prevent another caller from executing it. PCBoard creates the DOOR.BAT file from your batch file for your doors. This file is used as a temporary file so that DOS can execute your door application. - When PCBoard exits, it creates an ENDPCB file in the current directory. This file does not contain any useful information. Instead, it is used later in your BOARD.BAT to determine if PCBoard should reload, or jump to the end label. === Executing PCBoard === pcboard - This line serves one purpose -- to load PCBoard. If you want to use any of PCBoard's command line parameters, you need to specify them on this line. === After PCBoard Exits === if exist remote.bat remote if exist door.bat door if exist event.bat event if exist endpcb goto end board :end - Checks the current subdirectory to see if a file called REMOTE.BAT exists. If it does, execute it. It is the responsibility of this batch file to reload BOARD.BAT when finished. - Checks the current subdirectory to see if a file called DOOR.BAT exists. If it does, execute it. It is the responsibility of this batch file to reload BOARD.BAT when finished. - Checks the current subdirectory to see if a file called EVENT.BAT exists. If it does, execute it. It is the responsibility of this batch file to reload BOARD.BAT when finished. - Checks the current subdirectory for a file called ENDPCB. If this file exists, goto the end label in the batch file which returns to DOS. - This line is a catch-all that will reload PCBoard if no ENDPCB file is found (which should always exist when PCBoard exits). - Defines a batch label called end.