You are here: start » pcboard » board_bat

BOARD.BAT

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
  1. This DOS batch file command will prevent each line from displaying on screen as it is executed.
  2. Changes to the C: drive.
  3. Changes to the PCB subdirectory.
  4. Defines the PCB environment variable. If you want to use any of PCBoard's environment switches you must add them to this line.
  5. 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.
  6. 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.
  7. 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.
  8. 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
  1. 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
  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. This line is a catch-all that will reload PCBoard if no ENDPCB file is found (which should always exist when PCBoard exits).
  6. Defines a batch label called end.
pcboard/board_bat.txt · Last modified: 2019/04/17 16:20
CC Attribution 4.0 International Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution 4.0 International