@echo off
rem
rem To display text to the user after returning from the door, create a file
rem called PCBDOOR.TXT in the node or default subdirectory.  For example,
rem to display a "Sample Door" title after the door has run, use the
rem following two statements which make use of DOS' redirection statements.
rem
      echo Sample Door >>pcbdoor.txt
      echo ----------- >>pcbdoor.txt
rem
rem PCBoard creates four environment variables you can use in your door batch
rem files to simplify your multiple node setup.  The next few statements show
rem you the contents of the environment variables by adding them to the
rem PCBDOOR.TXT file (which PCBoard will display after the door executes).
rem
      echo.
      echo         Drive PCBoard ran from: %PCBDRIVE% >>pcbdoor.txt
      echo  Subdirectory PCBoard ran from: %PCBDIR% >>pcbdoor.txt
      echo         PCBOARD.DAT being used: %PCBDAT% >>pcbdoor.txt
      echo            Current node number: %PCBNODE% >>pcbdoor.txt
      echo.
rem
rem Notice that the environment variables are surrounded with % signs.  You
rem must surround an environment variable with % signs if you want to reference
rem the contents of the variable in a DOS batch file.
rem
rem Any paramaters that are passed to the door are stored in the PCBDOOR
rem environment variable.  You can use access any environment variable in
rem a batch file by surrounding it by percent (%) signs.  The following line
rem will show the parameters passed by outputing them to PCBDOOR.TXT (so you
rem can view them after the door runs).
rem
      echo Parameters passed to this door: %PCBDOOR% >>pcbdoor.txt
rem
rem The following four lines will make sure that the door always returns to
rem PCBoard (even if the door is configured to operate via shelling).  You
rem can use these four lines at the end of all of your door batch files.

      if "%INPCB%" == "Y" exit
      %pcbdrive%
      cd %pcbdir%
      board
rem
rem These four statements first check to see if we shelled out to the door.
rem If so, we exit back to PCBoard.  Otherwise, we change to the drive
rem and subdirectory where PCBoard executed from and rerun BOARD.BAT.
