home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / trays09b.zip / resttray.cmd < prev   
OS/2 REXX Batch file  |  2000-03-20  |  657b  |  35 lines

  1. /* Rexx Script by SubSyS solutions*/
  2.  
  3. parse arg backupfile
  4.  
  5. say ""
  6. say "RestoreTray for WarpCenter V0.9b by SubSyS "
  7. say ""
  8. If backupfile = "" then signal HELPTXT
  9.  
  10.  
  11. rc = RxFuncAdd('SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs')
  12. call SysLoadFuncs
  13.  
  14. do while lines(backupfile) = 1
  15.  
  16. string = linein(backupfile)
  17. if string = "" then leave
  18. tlen = pos(",", string) - 9
  19. say "Restoring Tray: " substr(string, 9, tlen) "please wait..."
  20.  
  21. rc = SysSetObjectData('<WP_WARPCENTER>',string)
  22.  If rc = 1 then say "Done!" 
  23.  
  24. end
  25. exit
  26.  
  27. HELPTXT:
  28.  
  29. say "Usage:"
  30. say " resttray<.cmd> backupfile"
  31. say "  e.g.: resttray C:\backup\wctray01.set"
  32. say
  33.  
  34.  
  35. ENDE: