/***$VER: DzA 2.1 (1.6.1997) CopyRight (C) DCG
***/
Options failat 21;NL='0a'x;IF ~SHOW('LIBRARIES','rexxreqtools.library') THEN;DO;IF ~ADDLIB('rexxreqtools.library',10,-30,0) THEN;DO;SAY 'Cant Find <RexxReqtools.library> Please Install...=(';EXIT(10);END;END;dcheck=exists('c:dms');if dcheck=0;then;do;call rtezrequest("DmS not found in C:...","ShiT!","DzA 2.1",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext');exit;end;dcheck=exists('c:lha');if dcheck=0;then;do;call rtezrequest("LhA not found in C:...","ShiT!","DzA 2.1",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext');exit;end;dcheck=exists('c:lzx');if dcheck=0;then;do;call rtezrequest("LzX not found in C:...","ShiT!","DzA 2.1",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext');exit;end;call rtezrequest("Welcome to DzA...","DzA","DCG",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext');acommand:;call rtezrequest("Choose Option...","_Pack|Un_Pack|_Convert|_Cancel","DzA",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext');if rtresult==0 then call endcommand;if rtresult==1 then call arccommand;if rtresult==2 then call extcommand;if rtresult==3 then call concommand;exit;arccommand:;call rtezrequest("Choose Method...","_LhA|_LzX|_DmS|_Cancel","DzA",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext');if rtresult==0 then exit;if rtresult==1 then arc=lha;if rtresult==2 then arc=lzx;if rtresult==3 then call dmscommand;file=rtfilerequest('Ram:',,"Choose Files to Pack",,"rt_reqpos=reqpos_centerscr rtfi_flags = freqf_patgad|freqf_selectdirs|freqf_selectdirs|freqf_multiselect rtfi_matchpat=#?|#?.info");if file='' then call errcommand;dir=rtfilerequest('Ram:',,"Path and Name for File",,"rt_reqpos=reqpos_centerscr rtfi_flags = freqf_save");if dir='' then call errcommand;ldir=left(dir,9);select;when ldir='Ram Disk:' then dir= delstr(dir,4,5);otherwise;end;call arcommand;extcommand:;file=rtfilerequest('Ram:',,"Choose File to UnPack",,"rt_reqpos=reqpos_centerscr rtfi_flags = freqf_patgad rtfi_matchpat=#?.(lha|lzh|lzx|dms|zip)");if file='' then call errcommand;dir=rtfilerequest('Ram:',,"Path for File",,"rt_reqpos=reqpos_centerscr rtfi_flags = freqf_save|freqf_nofiles");if dir='' then call errcommand;ldir=left(dir,9);select;when ldir='Ram Disk:' then dir= delstr(dir,4,5);otherwise;end;call xxtcommand;concommand:;file=rtfilerequest('Ram:',,"Choose File to Convert",,"rt_reqpos=reqpos_centerscr rtfi_flags = freqf_patgad rtfi_matchpat=#?.(lha|lzh|lzx)");if file='' then call errcommand;dir=rtfilerequest('Ram:',,"Path and Name for File ",,"rt_reqpos=reqpos_centerscr rtfi_flags = freqf_save");if dir='' then call errcommand;ldir=left(dir,9);select;when ldir='Ram Disk:' then dir= delstr(dir,4,5);otherwise;end;call xconcommand;dmscommand:;dev=rtfilerequest('Ram:',,"Device to DmS",,"rt_reqpos=reqpos_centerscr rtfi_volumerequest = 0");if dev='' then call errcommand;dir=rtfilerequest('Ram:',,"Path and Name for DmS",,"rt_reqpos=reqpos_centerscr rtfi_flags = freqf_save");if dir='' then call errcommand;ldir=left(dir,9);select;when ldir='Ram Disk:' then dir= delstr(dir,4,5);otherwise;end;call admcommand;xxtcommand:;ext=upper(right(file,3));select;when ext='LHA' then call xlhcommand;when ext='LZX' then call xlzcommand;when ext='DMS' then call xdmcommand;when ext='LZH' then call xlhcommand;when ext='ZIP' then call zipcommand;when ext~='???' then call ???command;otherwise;end;arcommand:;select;when arc=lha then call alhcommand;when arc=lzx then call alzcommand;otherwise;end;xconcommand:;ext=upper(right(file,3));select;when ext='LHA' then call conacommand;when ext='LZX' then call conzcommand;when ext='LZH' then call conacommand;otherwise;end;alhcommand:;rfile=left(file,9);select;when rfile='Ram Disk:' then call ralhcommand;otherwise;end;call time 'R';address command;do i=1 to rtresult.count;'lha -r -e a -q ' dir rtresult.i;end;call timecommand;alzcommand:;rfile=left(file,9);select;when rfile='Ram Disk:' then call ralzcommand;otherwise;end;call time 'R';address command;do i=1 to rtresult.count;'lzx -r -e a -q ' dir rtresult.i;end;call timecommand;ralhcommand:;call time 'R';address command;do i=1 to rtresult.count;rtresult.i= delstr(rtresult.i,4,5);'lha -r -e a -q ' dir rtresult.i;end;call timecommand;ralzcommand:;call time 'R';address command;do i=1 to rtresult.count;rtresult.i= delstr(rtresult.i,4,5);'lzx -r -e a -q ' dir rtresult.i;end;call timecommand;xlhcommand:;rfile=left(file,9);if rfile='Ram Disk:' then file= delstr(file,4,5);call time 'R';address command;'lha x -q ' file dir;call timecommand;xlzcommand:;rfile=left(file,9);if rfile='Ram Disk:' then file= delstr(file,4,5);call time 'R';address command;'lzx x -q ' file dir;call timecommand;conacommand:;rfile=left(file,9);if rfile='Ram Disk:' then file= delstr(file,4,5);call time 'R';address command;'lha x -q ' file 'ram:lzx/';'lzx -r a -q ' dir 'ram:lzx';'delete all q ram:lzx';call timecommand;conzcommand:;rfile=left(file,9);if rfile='Ram Disk:' then file= delstr(file,4,5);call time 'R';address command;'lzx x -q ' file 'ram:lha/';'lha -r a -q ' dir 'ram:lha';'delete all q ram:lha';call timecommand;admcommand:;call time 'R';address command;'dms read ' dir from dev;call timecommand;xdmcommand:;rfile=left(file,9);if rfile='Ram Disk:' then file= delstr(file,4,5);call time 'R';address command;'dms write ' file to dir 'nopause';call timecommand;zipcommand:;rfile=left(file,9);if rfile='Ram Disk:' then file= delstr(file,4,5);call time 'R';address command;'unzip -o -q ' file '-d' dir;call timecommand;???command:;call rtfreefilebuffer();call rtezrequest("Sorry Unknown...","_OK","DzA",'rt_reqpos=reqpos_centerscr');call acommand;errcommand:;call rtfreefilebuffer();call rtezrequest("Please Enter FileName"||NL||"     Go_Again...","_Oops","DzA",'rt_reqpos=reqpos_centerscr');call acommand;timecommand:;call rtezrequest("Time Taken" time('E') "secs.","_WoW","DzA",'rt_reqpos=reqpos_centerscr');endcommand:;call rtfreefilebuffer();call rtezrequest("Go_Again...","_Sure|_Quit","DCG",'rt_reqpos=reqpos_centerscr');if rtresult==0 then exit;if rtresult==1 then call acommand;end;exit