home *** CD-ROM | disk | FTP | other *** search
- /*
- * Unarj to directory in which file resides (for WPS drag-and-drop)
- * Must pass fully qualified name of arj file (d&d does)
- */
- arg filename
- if length(filename) < 2 then exit
- call setlocal
- pathname = filename
- pathname = left(pathname,lastpos('\',pathname))
- if pathname = '' then
- do
- say 'Pass the fully qualified pathname of the file, please.'
- exit
- end
- if substr(pathname,length(pathname) - 1,1) \= ':' then
- do
- pathname = left(pathname,length(pathname) - 1)
- end
- call directory pathname
- say '['directory()'] unarj x 'filename
- /*
- * modify this line if unarj not on PATH or is named something
- * besides unarj.exe, or to add or remove command line switches
- */
- 'unarj x 'filename
- /* open the folder where the file was just unarjed */
- call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
- call SysLoadFuncs
- call SysSetObjectData directory(), "OPEN=DEFAULT"
- call endlocal
- /* Hector wuz here */
-