home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Beijing Paradise BBS Backup
/
PARADISE.ISO
/
software
/
BBSDOORW
/
SCRIPTS.ZIP
/
BIXFUPL.T
< prev
next >
Wrap
Text File
|
1991-10-02
|
2KB
|
83 lines
:: bixupl.t Rev 9-12-91
:: <<< a HACK to allow the use of CompuServe .key files for BIX >>>
:: Control file fields, explanation, variable name:
:: yamix.Q /u/t/yam/yam386ix.Q /u/t/yam/yam386ix.key bin IBM.DOS APPLICATION
:: BIX name local pathname key file pathname typ area subarea
:: %fname %pathname %keypath %typ %area %subarea
::
:: All fields must be set except for optional subarea
:: "typ" field not used yet
:: Not much error correction - just close files.
:: Get pathnames etc. from control file.
set s0 ""
open -!tg %item; grab s0
echoc "bixfupl.t: processing %item"
while "t&&!%s0" grab s0
set ifs " " : split on space or tab
split s0
nolog closetx
sets fname %z0
sets pathname %z1
sets keypath %z2
sets typ %z3
sets area %z4
sets subarea %z5
if !%area goto badspec
echo "%fname %pathname %keypath %typ %area %subarea"
on !c o fail
:: join listings if not already, set area, [subarea]
pat
pat 1 "]:"
put "join listings\r"
wait
put "area %area\r"
wait
if %subarea put "subarea %subarea\r" wait
pat 1c "only ASCII text?" "n\r"
pat 2 "send using ZMODEM"
pat 3 "File already exists:"
put "send %fname\r"
wait
if 3 goto failed
:: Send file with ZMODEM. Window size set in bixXX directory entry
pe0
sz %pathname
if e goto failed
pat 1 "Transfer complete"
wait
if !1 goto failed
:: Upload description, paced with > character
pg62; ena -p
open %keypath
next: grab s0
if "t&&!ps0,/exit" put "%s0\r" goback next
grab s0; sets s1 "%s0" :: keywords
nolog closetx
dis -p
put ".\r"
pat 1 "enter keywords"
wait
trs s1 " " "\r" :: Change comma sep to separate lines
putv s1
put "\r.\r"
pat 1 "]:"
wait
if !dv "!%mv %item bixupl/done"
if dv "!%rename %item [.bixupl.done]%item"
echoc "bixfupl.t finished with %item"
return
badspec: closetx
echoc "bixfupl.t: illegal syntax in %item"
return
failed: closetx
echoc "bixfupl.t: Upload of %item not accomplished"
return