home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / applications / wp / xes131.lha / XES / REXX / SaveFile.xdme < prev    next >
Encoding:
Text File  |  1994-12-23  |  759 b   |  31 lines

  1. /* SaveFile.xdme */
  2. /* Copyright © 1994 Fergus Duniho */
  3.  
  4. if ~show("L","rexxsupport.library") then
  5.     if ~addlib("rexxsupport.library",0,-30,0) then exit
  6.  
  7. options results
  8. address 'XDME.1'
  9. 'rxresult $method'
  10. method = result
  11. compressor = "LIBS:compressors/xpk" || method || ".library"
  12. 'rxresult $filename'
  13. fullname = result
  14.  
  15. if method = "NONE" || ~exists(compressor) then do
  16.     saveold
  17. end
  18. else do
  19.     'writeto t:temp'
  20.     'rxresult $password'
  21.     password = result
  22.     if password = "RESULT" then
  23.         xcom = 'execute (xpack t:temp method' method || ')'
  24.     else
  25.         xcom = 'execute (xpack t:temp method' method 'password "' || password || '")'
  26.     xcom
  27.     xcom = "execute (copy t:temp """ || fullname || """)"
  28.     xcom
  29.     call delete("t:temp")
  30. end
  31.