home *** CD-ROM | disk | FTP | other *** search
- :: See comments at end of the file Rev 10-7-91
- open -!tgx %item
- echoc "upl.t: processing %item"
- set s1 "" : flag indicatng Sysop quota exceeded
- cloop: grab s0
- while "t&&!%s0" grab s0
- ss s0 "^(@)(.*)"
- if "t&&%z1" echof "Command Line: %z2"; obey "%z2"; goback cloop
- closetx
- set ifs " " : split on space or tab
- split s0
- if "!%z2" goto failed
- if !f%z2 goto nofile
- if !f%z1 goto nofile
- pat
- pat 0cp " ^Q " "\021"
- pat 1v "\nDL "
- pat 6v "\nLIB %z3"
- on !c o; fail
- if az3 put "\025DL%z3\r" : get to proper DL section
- else put "\025DL0\r"
- wait -f40
- if !1&&!6 goto failed
- wait -f1
-
- set typ "bin"
- if jz0,.doc set typ "ascii"
- if jz0,.txt set typ "ascii"
- if %z4 sets typ %z4
-
- echoc "Enabling c mode"
- ena -c
- put "upl %z0/type:%typ/proto:b\r"
- pat 2cv "Replace it" "y\r"
- pat 4cv "File name truncated to " "y\r"
- pat 1v "File name for your computer"
- pat 3v "Please notify the Sy"
- wait -f40
- if 3 set s1 "quota"; goto failed
- if !1 goto failed
- wait -f1
- put "\025\T%z1"; put "\r"
- timestamp
- pat 1v "Description"
- pat 2v "?DO_UPL-ERR"
- wait -f60
- :: CIS uploads the file here (B Protocol)
- echoc "Disabling c mode"
- dis -c
- timestamp
- if 2 goto failed
- if !1 echo "Didn't find pattern 2"; wait -f40
- if 2 goto failed
- if !1 echo "Didn't find pattern 2"; wait -f40
- if 2 goto failed
- wait -f1
- pat 1v "okay"
- pg10; ena -p; pq8; put "\025"
- pat 4c "6 EXIT" "6\r"
- open -g!x %z2
- wait -f40
- ena -t!p
- timestamp
- pv5
- put "\025Y\r"
- pat 5v "soon as"
- wait -f400
- pv0
- timestamp
- if !5 echoc "Timeout (400 seconds!) waiting for completion message."; goto failed
- if !dv "!%mv %item cisupl/done"
- if dv "!%rename %item [.cisupl.done]%item"
- goto final
- nofile: echoc "FILE %z0 or %z1 NOT FOUND!!!"
- failed: echoc "Upload (control file %item) failed"
- ena -t!p
- final: nolog closetx
- echoc "upl.t finished with %item"
- pat
- pat 1v "Forum !\b" :Desired response
- pat 2v "Function: \b" :Desired response
- put "\r"
- wait -f20
- pe0
- if %s1 fail : Terminate "expand" if quota problem
- return
-
- :: Upload a file to a SIG, assumes we are at the SIG Function: prompt
- :: and (hopefully) returns us there. Gives up on error.
- :: This is called by a line such as:
- if %s8 obey "expand upl.t cisupl/%s8*"
- :: and expects to find one line CONTROL FILES such as:
-
- disinf.txt $p/disinfo.txt /t/yam/disinf.key 0 ascii
-
- :: The control file may have any number of optional leading command lines,
- :: @immediate command(s)
-
- :: where the first field is the SIG filename, the second field is the
- :: pathname on the YAM system, the third field the pathname for the
- :: description/key file, the fourth field is the DL section number.
- :: Am optional fifth field gives the upload type (ascii), default bin.
- ::
- :: The descritpion file contains the description (500 char max), a
- :: /exit line, the keywords, and the title (sample below):
-
- DSZ is optimized to be called from a bulletin board or other comm
- program to support YMODEM and fast ZMODEM file transfers. This version
- has buffered XMIT for greater throughput, esp. with multitasking
- executives. Automatic selection of comm port, baud rate, etc with
- override. Supports 32 bit CRC, wild card xfers, recovery from line
- disconnects, etc. See dsz.dqc and the ZCOMM or Pro-YAM user's manual
- for more information, also ZMODEM.DOC. (part of ZMODEM.ARC).
- /exit
- ZMODEM YMODEM CRC-16 FILE-TRANSFER THROUGHPUT XMODEM CRC-32
- Program Title (50 chars max)
-
- :: This script assumes the SIG editor has been selected, it will not
- :: wotk with the line editor.
- ::
- :: Upon successful upload, the control file is moved to the "done"
- :: subdirectory, or the "failed" subdirectory otherwise.
- :: File is uploaded as type bin unless it has an extension of .doc or .txt
- :: The optional fifth field (if present) overrides the above choice.
-