home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / PCLPACK.ZIP / NICE.ZIP / MACS.ZIP / UBATCH.CTL < prev    next >
Encoding:
Text File  |  1992-09-02  |  3.9 KB  |  163 lines

  1.  
  2.  setequal(w=1)
  3.  kill(udescs.%NODE%,ubatch.%NODE%,ubatch1.%NODE%)
  4.  
  5. *fname
  6.   if (&w)=(10) then goto (askup)
  7.   say(&CR&&10&Pressing (ENTER) will let you start uploading your files.)
  8.   say(&3&Please enter name of the file to upload&12&: &14&(            )&15&*)
  9.   back(13)
  10.   menuask%NOCR%%CRON%%LEN12%(*)
  11.   if (%RESP%)=(<CR>) then Say ()
  12.   if (%RESP%)=(<CR>) then goto (askup)
  13.   len(%Resp%)
  14.   back(%Aresp%)
  15.   adddef(.%DEFEXT%)
  16.   say(%Resp%)
  17.   setequal(d=%RESP%)
  18.   iseek(%var%d)
  19.   if (%aresp%)=(Yes) then goto (ishere)
  20.   if (%Aresp%)=(INVALID) then goto (invfn)
  21.   appendto(ubatch.%NODE%,files\uploads\%var%d)
  22.   setequal(^%var%w=files\uploads\%var%d)
  23.   inc(w)
  24.   appendto(ubatch1.%NODE%,%var%d)
  25.   say(&CR&&14&Please enter a description for your file.  &10&The description can take up 3 lines.*)
  26.   resetwrap   ;the resetwrap command resets the wordwrap.
  27.   say(&CR&&15&   (----2----3----4----5----6----7---8----))
  28.   wrapask %MIN1%%LEN40%(&3&1&12&: &15&*)
  29.   setequal(r=1)
  30.   appendto(udescs.%NODE%,%RESP%)
  31.   wrapask %LEN40%%CRON%(&3&2&12&: &15&*)
  32.   find(%resp%,<CR>)
  33.   notif (%aresp%)=(0) then goto (nomore)
  34.   appendto(udescs.%NODE%,%RESP%)
  35.   setequal(r=2)
  36.   ask %LEN39%(&3&3&12&: &15&*)
  37.   appendto(udescs.%NODE%,%RESP%)
  38.   setequal(r=3)
  39.   goto (fname)
  40.  
  41. *nomore
  42.   appendto(udescs.%NODE%, )
  43.   appendto(udescs.%NODE%, )
  44.   goto (fname)
  45.  
  46. *askup
  47.   if (^1)=() then goto (ex)
  48.   say(&CR&&3&       Would you like to upload these files? &9&[   ]&14&*)
  49.   back(4)
  50.   yesnoask(*)
  51.   if (%Resp%)=(No) then goto (ex)
  52.   say(&3&Would you like us to log you off afterwards? &9&[   ]&14&*)
  53.   back(4)
  54.   yesnoask(*)
  55.   setequal(m=%RESP%)
  56.   if (%LOCAL%)=(TRUE) then goto (local)
  57.   setactivity(Uploading Files)
  58.   say(&CR&&11&We're ready to receive the files.  Please start sending them now.)
  59.   fixfile(protocol\%var%b-u.bt,protocol\%var%b-u.bat)
  60.   initclock ;initalize the timer that keeps track of how long the d/l took...
  61.   exec(protocol\%var%b-u.BAT│)
  62.   kill(protocol\%var%b-u.bat)
  63.  
  64. *success
  65.   notif (%ARESP%)=(0) then goto (aborted)
  66.   xfertime
  67.   setequal(e=%ARESP%)
  68.   if (%ARESP%)=(ERROR) then goto (dsucc)
  69.   upped
  70.   setequal(t=0)
  71.   linefeed(1)
  72.   setequal(a=/:UPLOADS/)
  73.   clearmem
  74.   setequal(c=0)
  75.   setequal(i=1)
  76.  
  77. *stcalc
  78.   inpline(ubatch1.%NODE%,%var%i)
  79.   if (%ARESP%)=() then goto (donecalc)
  80.   setequal(d=%ARESP%)
  81.   setequal(b=0)
  82.   loadsub(zc\zc.ctl)
  83.   if (&a)=(2) then goto (nextfile)
  84.   size(files\uploads\%var%d)
  85.   addvar(%var%t+%ARESP%=t)
  86.   cnvtk(%ARESP%)
  87.   addvar(%ARESP%+/:KUP/=o)
  88.   setequal(/KUP=%var%o)
  89.   multvar(%var%c*3=y)
  90.   if (&b)=(0) then arrayread(udescs.%NODE%,%var%y,3)
  91.   file(files\uploads\,%var%d,10)
  92.   log(--,%var%d Uploaded (batch).)
  93.   appendto(logs\UPLOAD.%NODE%,%var%d uploaded at %TIME% on %DATE% by %NAME%.)
  94. *nextfile
  95.   inc(i)
  96.   inc(c)
  97.   goto (stcalc)
  98.  
  99. *donecalc
  100.   inc(c)
  101.   say(%BEEP%)
  102.   multvar(%XMIN%*60=o)
  103.   divvar(%var%t/%var%o=g)
  104.   setequal(/UPLOADS=%var%a)
  105.   log(--,Rate: %var%g CPS)
  106.  
  107. *dsucc
  108.   display (display\SUCCUB)
  109.   if (%var%m)=(Yes) then goto (autooff)
  110.  
  111. *ex
  112.   selfarea(/:LASTDOWN/)
  113.   linefeed(1)
  114.   seek(bxtest.bt)
  115.   if (%ARESP%)=(Yes) then goto (testup)
  116.   resetlist
  117.   listfile(%FAREA%)
  118.   Return
  119.  
  120. *aborted
  121.   log(--,Batch Download aborted.)
  122.   display (display\ABORTED)
  123.   goto (ex)
  124.  
  125. *ishere
  126.   display(display\ISHERE)
  127.   enter
  128.   linefeed(1)
  129.   goto (fname)
  130.  
  131. *testup
  132.   fixfile(bxcheck.bt,bxcheck.bat)
  133.   exec(bxcheck.bat)
  134.   display (display\USUCCESS)
  135.   goto (ex)
  136.  
  137. *autooff
  138.   loadmem(control\autoOff.ctl)
  139.  
  140. *local
  141.   initclock
  142.   say(&CR&&10&You will now specify the path where the file resides.  Ex: C:\DOWNLOADS\)
  143.   menuask(&3&Please enter the path&12&: &15&*)
  144.   fcopy (%RESP%\%var%d,files\uploads\%var%d)
  145.   goto (success)
  146.  
  147. *invfn
  148.   display(display\INVALID)
  149.   flushout
  150.   selfarea(/:LASTDOWN/)
  151.   enter
  152.   goto (fname)
  153.  
  154. *notenufs
  155.   display (display\NOSPACE)
  156.   selfarea(/:LASTDOWN/)
  157.   enter
  158.   goto (fname)
  159.  
  160. *phelp
  161.   display(display\help\prot,/:SEC/)
  162.   goto (pickprot)
  163.