[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
>> Sample Stand-Alone Batch File <<
>> (c) Gary Smith, Flight Path BBS [+44 81 759 1957] <<


echo off

   rem *==============================
   rem *=  Flight path batch v3.00a  =
   rem *==============================


   :load_ramdisk
   if exist m:done.txt goto start
   m:
   md txtfiles
   md menus
   copy e:\ra\menus m:\menus
   copy e:\ra\txtfiles m:\txtfiles
   echo all_done > m:done.txt
   dvansi

   :start

   rem **********************************
   rem catch last caller
   rem **********************************
       echo off
       cls
       e:
       cd\ra
       if not exist register.asw goto not_new_user
       echo *****************************
       echo New user has registered
       echo *****************************
       type register.asw >> e:\ra\logs\newuser.log
       del register.asw

   :not_new_user

       if not exist adults.asw goto and_action
       echo *****************************
       echo Request for adult file area
       echo *****************************
       type adults.asw >> e:\ra\logs\adults.fil
       del adults.asw


   :and_action

       echo Here we go!
       echo Here we go!
       echo Here we go!


       RA -n1 -E0 -d


   :after_bb
       rem ERRORLEVEL 99 = it's the sysop messin' about
       rem ERRORLEVEL 98 = QMX (mail express)   NOT ACTIVE since v1.17
       rem ERRORLEVEL 97 = TIMEBANK             NOT ACTIVE since v1.22
       rem ERRORLEVEL  7 = 00:02 It's Sunday's tidy up for the week.
       rem ERRORLEVEL  6 = 00:02 do the days paperwork
       rem ERRORLEVEL 10 = zipster              now type 7 exit
       rem ERRORLEVEL  0 = caller logged-off normally
       rem any other     = will be output to ERRORS.LOG

       if errorlevel 99 goto to_dos
   rem if errorlevel 10 goto zipster
       if errorlevel  7 goto sunday
       if errorlevel  6 goto house_work
       if errorlevel  0 goto start
       echo ***********************************
       echo ***  ERROR !  look in log file  ***
       echo ***********************************
       goto start

   :to_dos

       goto after_bb

       rem ********** DISABLED ***************
       c:
       cd\
       echo off
       cls
       echo type EXIT to return to FLIGHT-PATH
       command
       e:
       cd\ra

       RA -r -E0
       goto after_bb

   :zipster
       break off
       zipster
       RA -r -E0
       goto after_bb

   :qmx
       break off
       WatchCD Com2 On
       ctty gate2
       qmx.exe
       ctty con
       WatchCD Com2 Off
       RA -r -E0
       goto after_bb

   :thebank
       thebank.exe e:\qbbs\
       RA -r -E0
       goto after_bb

   :qmxmail
       copy e:\qmx\0000????.* e:\mail\files
       del e:\qmx\0000????.*

   :toss_echo
       cd\qbbs
       echogen -A -P -T -U

   goto and_action

   rem **********************************
   rem ****** Sundays sweep out *********
   rem **********************************

   :sunday

   rem   msgpack

   rem **********************************
   rem ************* House work *********
   rem **********************************

   :house_work


   rem   ramsg -Pk

       rem DAYNBR passes julian day no. to @###
       rem does it need doing?
       e:
       cd\ra\logs
       daynbr copy *.@### *.tmp
       if exist *.tmp goto not_now
       echo *****************************
       echo Doing the house work
       echo *****************************
       cd\ra
       rem update top 15 files
       logmod
       filescnt
       ftd 9
       hitlist 15 Flight_Path_BBS
       copy hitlist.a* e:\ra\txtfiles
       copy hitlist.a* m:\txtfiles
       del hitlist.a*
       rem now for the logs....
       daynbr copy ra.log logs\syslog.@###
       del ra.log
       del system.log
       if not exist logs\newuser.log goto no_new_callers
       echo *****************************
       echo New registrations posted
       echo *****************************
       daynbr ren \ra\logs\newuser.log newlog.@###

   :no_new_callers

       if not exist errors.log goto all_good
       daynbr copy errors.log logs\errlog.@###
       del errors.log
       echo *****************************
       echo ERRORS have occured !!
       echo *****************************

   :all_good

       rem house work done, now to make archive backups
       rem of all the logs
       echo *****************************
       echo Archive the day's logs
       echo *****************************
       cd\ra\logs
       e:\ra\daynbr copy *.@### temp.tmp
       if not exist *.tmp goto not_now
       e:\ra\daynbr c:\temp\pkzip logs@###.zip ???log.*
       e:\ra\daynbr if exist logs@###.zip del ???log.*

   :not_now

       del *.tmp
       cd\ra


   echo **********************************
   echo creating avail.txt & avail.arc/zip
   echo **********************************
        e:
        cd\ra
        tidy
        del d:\files\uploads\avail.*
        cd\files
        c:
        cd\aa
        shmlscan
        e:
   rem  c:\temp\pkpak a avail *.*
        c:\temp\pkzip avail avail.txt
        copy avail.* d:\files\uploads
        del avail.*
        cd\ra



        echo *********************************
        echo make top 15's files
        echo *********************************

   qbest multiple Flight_Path d10 u10 c10 m10 a10 o40 l30 /r /c /l /z /q /t /v

        ren qb_dltm.* top_1.*
        ren qb_ultm.* top_2.*
        ren qb_call.* top_3.*
        ren qb_msgs.* top_4.*
        ren qb_rprt.* top_5.*
        ren qb_dlkb.* top_6.*
        ren qb_ulkb.* top_7.*
        ren qb_areas.* top_8.*

        copy top_*.* e:\ra\txtfiles
        copy top_*.* m:\txtfiles
        del top_*.*
        e:
        cd\ra

   goto start

   rem busy isn't it....
   rem *****************

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson