home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Spezial / SPEZIAL2_97.zip / SPEZIAL2_97.iso / ANWEND / ONLINE / IMPRO / INETMAIL.ZIP / vd2reg.cmd < prev   
OS/2 REXX Batch file  |  1996-12-31  |  998b  |  38 lines

  1. /* rexx */
  2. /* This rexx script will convert the files in the queue
  3.    directory from virtual domain que files to regular
  4.    que files */
  5.  
  6. call RxFuncAdd 'SysTempFileName', 'RexxUtil', 'SysTempFileName'
  7. call RxFuncAdd 'SysFileDelete', 'RexxUtil', 'SysFileDelete'
  8. call RxFuncAdd 'SysFileTree', 'RexxUtil', 'SysFileTree'
  9.  
  10. rc = SysFileTree('*.que', s., 'FO')
  11.  
  12. if rc = 0 then do i = 1 to s.0
  13.   Tmp = SysTempFileName('????.tmp', '?')
  14.   rc = stream(Tmp, 'c', 'open write')
  15.   rc = stream(s.i, 'c', 'open read')
  16.  
  17.   Line = linein(s.i)        /* last tried */
  18.   rc = lineout(Tmp, Line, )
  19.  
  20.   Line = linein(s.i)        /* entry time */
  21.   rc = lineout(Tmp, Line, )
  22.  
  23.   Line = linein(s.i)        /* virtual domain, discard it */
  24.  
  25.   do while lines(s.i) <> 0       /* Now the rest of the lines */
  26.     Line = linein(s.i)
  27.     rc = lineout(Tmp, Line, )
  28.     end
  29.   rc = stream(Tmp, 'c', 'close')
  30.   rc = stream(s.i, 'c', 'close')
  31.  
  32.   copy Tmp s.i
  33.   rc = SysFileDelete(Tmp)
  34.   end
  35.  
  36. exit
  37.  
  38.