home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lansystk.zip / MPTSUTIL / APPLETS / CASLDLS.CMD < prev    next >
OS/2 REXX Batch file  |  1998-05-08  |  2KB  |  64 lines

  1. /* Stripped by STRIPRX.EXE */
  2. irc = RxFuncAdd("SysLoadFuncs","REXXUTIL","SysLoadFuncs")
  3. irc = RxFuncQuery("SysLoadFuncs")
  4. IF irc <> 0 THEN return 888
  5. irc = SysLoadFuncs()
  6. parse arg source target ifile
  7. if ifile = '' then return 444
  8. type.0 = 5 
  9. type.1 = 'S'
  10. type.1.name = 'Server'
  11. type.2 = 'R'
  12. type.2.name = 'Requester'
  13. type.3 = 'L'
  14. type.3.name = 'Lan Support Program'
  15. type.4 = 'D'
  16. type.4.name = 'DOS LAN Services'
  17. type.5 = 'N'
  18. type.5.name = 'MPTS'
  19. vol. = ''
  20. count = chars(ifile)
  21. filetext = charin(ifile,1,count)
  22. end = 'FALSE'; error = 0
  23. do while filetext <> '' & end = 'FALSE' & error = 0
  24. parse value filetext with line '0D0A'x filetext
  25. if line <> '' then do
  26. parse value line with left "=" right
  27. left = strip(left,'B',' ')
  28. first = substr(left,1,1)
  29. if datatype(substr(left,2,1)) = "CHAR" then end = 'TRUE'
  30. else do
  31. vollabel = strip(right,'B',' ')
  32. n = vol.first.0
  33. if n = '' then n = 0
  34. n = n + 1
  35. vol.first.0 = n
  36. vol.first.n.suf = left
  37. vol.first.n.lab = vollabel
  38. end
  39. end
  40. end
  41. do j = 1 to type.0
  42. index = type.j
  43. do i = 1 to vol.index.0
  44. call doit
  45. end
  46. end
  47. return error
  48. doit:
  49. dir = "IBM400"||vol.index.i.suf
  50. '@mkdir 'target||'\'||dir
  51. label = word(sysdriveinfo(strip(source,'T','\')),4)
  52. do while label <> vol.index.i.lab
  53. lrc = beep(400,300)
  54. say ' '
  55. say 'Insert 'type.j.name' - Disk 'i
  56. say '  Enter to continue....'
  57. say ' '
  58. parse pull .
  59. label = word(sysdriveinfo(strip(source,'T','\')),4)
  60. end
  61. '@xcopy 'strip(source,'T','\')||'\' target||'\'||dir' /s '
  62. if rc > 1 then error = 999
  63. return
  64.