AT2k Design BBS Message Area
Casually read the BBS message area using an easy to use interface. Messages are categorized exactly like they are on the BBS. You may post new messages or reply to existing messages!

You are not logged in. Login here for full access privileges.

Previous Message | Next Message | Back to BAT Magic  <--  <--- Return to Home Page
   Local Database  BAT Magic   [145 / 250] RSS
 From   To   Subject   Date/Time 
Message   Visitor    ALL   ADDPATH.BAT   October 18, 1995
 3:06 PM *  

My Bat Magic contribution for today:

@echo off
:: This is ADDPATH.BAT.  Author unknown
   if %1. == . goto SYNTAX
   FOR %%a IN (new,NEW,front,FRONT,old,OLD,save,SAVE) DO if %%a == %1 goto %%a
         if exist %1\*.* goto INP_PATH_OK
         if not exist %1*.* goto PATH_INVAL
:INP_PATH_OK
         set OLD_PATH=%PATH%
         path=%PATH%;%1
         echo.
         echo Drive/Directory %1 has beed added to the PATH
         echo.
         echo New PATH is %PATH%
         echo.
         goto END

:NEW
   if %2. == . goto SYNTAX
      set OLD_PATH=%PATH%
      path=%2
      goto END

:FRONT
   if %2. == . goto SYNTAX
      if exist %2\*.* goto NEW_FRONT
      if not exist %2*.* goto PATH_INVAL
:NEW_FRONT
      set OLD_PATH=%PATH%
      path=%2;%PATH%
      echo.
      echo Drive/Directory %2 has been added to the FRONT of the PATH
      echo.
      echo New PATH is %PATH%
      echo.
      goto END

:OLD
   if not %OLD_PATH%. == . goto RESTORE_OLD
      echo.
      echo No previous path
      echo.
      goto END
:RESTORE_OLD
   set TEMP_PATH=%PATH%
   path=%OLD_PATH%
   set OLD_PATH=%TEMP_PATH%
   set TEMP_PATH=
   echo.
   echo PATH restored to %PATH%
   echo.
GOTO END
:SAVE
   set OLD_PATH=%PATH%
   echo.
   echo Current Path, %PATH% ,saved
   echo.
   goto END

:PATH_INVAL
   echo.
   echo Error: Path is invalid or no files exist.
   echo.
   goto END

:SYNTAX
   echo.
   echo Syntax:  ADDPATH dr:\pathname        -- adds new dr:\pathname to PATH
   echo.
   echo          ADDPATH FRONT dr:\pathname  -- adds new to FRONT of PATH
   echo.
   echo          ADDPATH NEW (new path)      -- makes completely new PATH
   echo.
   echo          ADDPATH OLD                 -- restores previous PATH
   echo.
   echo          ADDPATH SAVE                -- saves current PATH and exits
   echo.
   echo.
   echo   Current Path is %PATH%
   echo.
   echo.
:END

Note, before you run this bat, check to see if you BBS or mail reader
wrapped any of the longer lines.
___ Blue Wave/QWK v2.12
  Show ANSI Codes | Hide BBCodes | Show Color Codes | Hide Encoding | Hide HTML Tags | Show Routing
Previous Message | Next Message | Back to BAT Magic  <--  <--- Return to Home Page

VADV-PHP
Execution Time: 0.0153 seconds

If you experience any problems with this website or need help, contact the webmaster.
VADV-PHP Copyright © 2002-2024 Steve Winn, Aspect Technologies. All Rights Reserved.
Virtual Advanced Copyright © 1995-1997 Roland De Graaf.
v2.1.241108