home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / comm / Fido / Spot / Rexx / PollBoss.spot < prev    next >
Text File  |  1993-10-03  |  2KB  |  63 lines

  1. /* This is an Arexx script which you can use from a cron to optimize spot area */
  2. /*                                                                                                                                                         */
  3. /* PollBoss.spot Version 1.1 © 1993 by Benoit Mortier                          */
  4. /*                                                                                                                                                         */
  5. /* For comments, remarks, bugs, etc. contact:                                    */
  6. /* Fidonet: 2:291/715.4                                                          */
  7. /* UUCP: mortier@mortier.adsp.sub.org                                                                                     */
  8. /*                                                                                                                                                         */
  9. /* the only thing you have to change is the path of your logfile                             */
  10.  
  11. options results
  12. address spot
  13.  
  14. if ~show(Libraries,'rexxsupport.library') then
  15.     if ~addlib("rexxsupport.library",0,-30,0) then exit
  16.  
  17. if ~show(Libraries,'rexxarplib.library') then
  18.     if ~addlib("rexxarplib.library",0,-30,0) then exit
  19.  
  20. 'poll NODE 2:291/715.0 NOREQ QUIET WAIT'
  21.  
  22. log = "logs:spot.log"
  23.  
  24. address command 'date >t:date'
  25.  
  26. call getdate
  27.  
  28. call movefile
  29.  
  30. 'import QUIET'
  31.  
  32. 'uniconify'
  33.  
  34. 'spot2front'
  35.  
  36. exit
  37.  
  38. getdate:
  39. open(date,'t:date','R')
  40.     today = readln(date)
  41.     date = subword(today,2,1)
  42.     time = subword(today,3,1)
  43. close(date)
  44.  
  45. delete(date)
  46. return
  47.  
  48. movefile:
  49. open(logfile,log,'A')
  50.  
  51. call filelist('mail:inbound/~*.((mo*|tu*|we*|th*|fr*|sa*|su*|pkt))',final,f,)
  52. if final.0 ~= 0 then do
  53.   do i = 1 to final.0
  54.     address command 'copy 'final.i' mail:Files/ CLONE'
  55.         call writech(logfile,'! 'date' 'time)
  56.     call writeln(logfile,'  Copying 'final.i' to mail:Files/')
  57.     call delete(final.i)
  58.   end
  59. end
  60.  
  61. close(logfile)
  62. return
  63.