home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / sqld100p.lzh / MECHOFIX.CMD < prev    next >
OS/2 REXX Batch file  |  1992-11-02  |  2KB  |  57 lines

  1. /* MECHOFIX.CMD : Message ECHo "FIXer"                                  */
  2. /*              : by Graham J Stair  (October 1992)                     */
  3. /*
  4. ** 1.. You need to change the 'sqlddir' and 'sqldrescan' variables just below.
  5. ** 2.. You also need to make sure you have the SQUALID instructions 'RescanFile'
  6. **     and 'RescanCmd' set up in your SQUISH.CFG, and ensure the 'sqldrescan'
  7. **     variable points to the same file as the 'RescanFile' instruction.
  8. ** 3.. Change the variable 'sqshpack' to the command you want to execute to
  9. **     pack up your outgoing mail.
  10. ** 4.. Delete all these comments. They only slow things down.
  11. **
  12. **           IF IT DON'T WORK, FIX IT! OR LOSE IT!
  13. */
  14.  
  15. trace off
  16.  
  17. '@echo off'
  18.  
  19. /* Change this to reflect your SQUALID directory */
  20. sqlddir = "C:\SQUALID"
  21.  
  22. /* Change this to reflect the SQUALID RescanFile instruction */
  23. sqldrescan = "C:\SQUALID\SQRESCAN.CMD"
  24.  
  25. /* Change this to execute a "pack" on your system */
  26. sqshpack = "C:\SQUISH\SQUISHP SQUASH"
  27.  
  28. savedir = directory()
  29. call directory(sqlddir)
  30.  
  31. /* This call to SQUALID assumes you have the SQUISH environment         */
  32. /* variable setup prior to calling MECHOFIX                             */
  33.  
  34. 'squalidp auto'
  35. sqldrc = rc                     /* Save the return code for further use */
  36.  
  37. /* This next bit assumes you have these two SQUALID instructions 
  38. ** in your SQUISH.CFG....
  39. **
  40. App Squalid RescanFile    c:\squalid\sqrescan.cmd
  41. App Squalid RescanCmd     SQUISHP RESCAN 
  42. **
  43. */
  44. result = stream(sqldrescan, 'c', 'query exists')
  45. if (result <> "") then
  46.    do
  47.    'call 'sqldrescan
  48.    'del  'sqldrescan
  49.    end
  50.  
  51. /* Only pack IF a rescan was done, or netmail was generated! */
  52. if (result <> "") | (bitand(sqldrc, 2) > 0) | (bitand(sqldrc, 4) > 0) then
  53.    sqshpack
  54.  
  55.  
  56. call directory(savedir)
  57.