home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / lorautil.zip / NET.CMD < prev    next >
OS/2 REXX Batch file  |  1994-02-24  |  1KB  |  45 lines

  1. /* REXX */
  2.  
  3. /* CMD file to search outbound directories for xxxxxxxx.XUT files (outbound packets)
  4. and if found, rename them to xxxxxxxx.OUT so Lora will send them. */
  5.  
  6.  
  7. /* check whether RxFuncs are loaded. If not, load them. */
  8. if RxFuncQuery('SysLoadFuncs') then
  9. do
  10.     call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  11.     call SysLoadFuncs
  12. end
  13.  
  14. /* set up directories needed */
  15. out_loc = 'd:\lora\outbound'
  16. out2_loc = 'd:\lora\outbound.051'
  17.  
  18. /* move to outbound directory */
  19. call directory out_loc
  20.  
  21. /* now see if there are any *.XUT files there */
  22. call SysFileTree '*.XUT', 'x_files', 'FO'
  23.  
  24. /* test if there are any. If not, exit */
  25. if x_files.0 > 0 then
  26. do
  27.     'rename *.XUT *.OUT'
  28.     'COPY D:\LORA\FILE\RESCAN.NOW D:\LORA'
  29. end
  30.  
  31. /* search the other outbound directory */
  32. call directory out2_loc
  33. call SysFileTree '*.XUT', 'x_files', 'FO'
  34. if x_files.0 > 0 then
  35. do
  36.     'rename *.XUT *.OUT'
  37.     'COPY D:\LORA\FILE\RESCAN.NOW D:\LORA'    /* copy a dummy file
  38.                                 to force Lora to rescan
  39.                                 the outbound dirs */
  40. end
  41.  
  42. /* now exit in any case */
  43. return
  44. exit
  45.