home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of Mecomp Multimedia 1
/
Mecomp-CD.iso
/
amiga
/
tools
/
opus
/
opus-tools5.x
/
arcdir
/
arexx
/
newarc.dopus5
< prev
Wrap
Text File
|
1997-06-27
|
1KB
|
52 lines
/*
$VER: NewArc.dopus5 1.1 (6.6.97)
Written by Edmund Vermeulen <edmundv@xs4all.nl>.
ARexx script for Directory Opus 5 to create a new (empty) archive.
The archive may be of the LhA or LZX type. Default is LhA.
Function : ARexx DOpus5:ARexx/NewArc.dopus5 {Qp}
*/
parse arg portname .
if portname='' then /* in case they forgot */
portname='DOPUS.1'
address value portname
options results
options failat 21
lister query source
if rc>0 then
exit
parse var result handle . /* only need first source */
lister set handle busy on
dopus getstring '"Enter archive name to create." 31 "" Create|Cancel'
arcname=result
if arcname=='' | arcname='RESULT' then do
lister set handle busy off
exit
end
lister query handle path
winpath=result
arcname=winpath||arcname
ext=upper(right(arcname,4))
if ext='.LZX' then
address command 'LZX a "'arcname'" %'
else do
if ext~='.LHA' then
arcname=arcname'.lha'
call open('emptyarchive',arcname,'w') then do
call writech('emptyarchive','0'x)
call close('emptyarchive')
end
command protect 'NAME "'arcname'" CLEAR e'
lister set handle busy off
lister read handle '"'winpath'"' force