home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / comm / zcm_scrp.zip / DOW.T < prev    next >
Text File  |  1989-11-21  |  1KB  |  51 lines

  1.     :: download files from a SIG DL section
  2.     :: %item is a control file: CIS filename, DL section, pathname
  3.     :: such as "foobar.arc 0 /usr/spool/yam/garbonzo.arc"
  4.     :: Missing pathname implies use of the CIS file name forced to LC
  5.     :: Missing DL section implies 0
  6.     :: move control file to subdirectory "done" when finished
  7.     echoc "dow.t Processing control file %item"
  8.     pat
  9.     pat 1v "\nDL "
  10.     pat 2v "\nLIB "
  11.     on !c o; fail
  12.     open %item
  13. empty:    if !t goto failed
  14.     grab s0
  15.     if !%s0 goto empty
  16.     closetx
  17.     split s0 "     ," "     ,"
  18.     if !%z1 set z1 "0"
  19.     if !%z2 setc z2 "\L%z0"
  20.     echoc "File:%z0 DL:%z1"
  21.     put "\b\b\bdl%z1\r"        : send us to the proper DL section
  22.     wait -f40
  23.  
  24.     ki        :: put in the stopper for "h" test below
  25.     pat 0c "computer:" "\b\b\b%z2\r"
  26.     pat 9 "Can't locate that"
  27.     put "\b\b\bcat %z0/des\r"
  28.     wait -f40
  29.     if 9 goto failed
  30.     if !h^\[ echo "Can't find Project Programmer Number"; goto failed
  31.     pv9
  32.     del %z2
  33.     echoc "DEL returned"
  34.     ena -c
  35.     put "\b\b\bdow %z0/proto:b\r"
  36.     wait -f40
  37.     echoc "wait returned"
  38.     pv0
  39.     dis -c
  40.     if 9 goto failed
  41.  
  42. done:    obey "!mv %item dow/done"
  43.     goto getback
  44.  
  45. failed:    obey "!mv %item dow/failed"
  46. getback:    putw "\b\b\b\r"
  47.     pat
  48.     pat 1 unction
  49.     wait -f50
  50.     return
  51.