home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / mfreqv10.zip / MakeFreq.Cmd < prev   
OS/2 REXX Batch file  |  1996-01-11  |  2KB  |  76 lines

  1. /* ************************************* */
  2. /* ┌───────────────────────────────────┐ */
  3. /* │ ╓──┐╥   ─╥─ ╥──┐╓──┐╓──┐╥──┐╓─╥─┐ │ */
  4. /* │ ║   ║    ║  ╟──┘╙──┐║  │╟─    ║   │ */
  5. /* │ ╙──┘╨──┘─╨─ ╨   ╙──┘╙──┘╨     ╨   │ */
  6. /* │ ────═════ MakeFreq v1.0 ═════──── │ */
  7. /* │                                   │ */
  8. /* │MakeFreq is a utility for AdeptXBBS│ */
  9. /* │to create fast and easy a Public.ok│ */
  10. /* │file from the File_Areas file. This│ */
  11. /* │utility supports Magic filenames!  │ */
  12. /* │                                   │ */
  13. /* └─────════ By Koen Koster ════──────┘ */
  14. /* Any comments, questions, thanks msgs? */
  15. /* Send them to:     kkoster@cistron.nl  */
  16. /*                   2:281/602.0@FidoNet */
  17. /*                   55:66/0.0@AdeptNet  */
  18. /* ************************************* */
  19.  
  20. /* ***** Start Configurable section **** */
  21.  
  22. areafile  = '\adept\system\file_areas'   /* Your file_areas file */
  23. magicfile = 'magic.txt'                  /* Your magicname file  */
  24. outfile   = 'Public.Ok'                  /* Output request file  */
  25.  
  26. /* ****** End Configurable Section ***** */
  27.  
  28. rc = stream( magicfile, 'c', 'open read' )
  29.     magicnr = '1'
  30.     check = lines(magicfile)
  31.     Do While check > 0
  32.     line = LineIn(magicfile)
  33.     Call LineOut outfile,line
  34.     magicnr =magicnr + 1
  35.     check = lines(magicfile)
  36.     End
  37. rc = stream( magicfile, 'c', 'close' )
  38.  
  39. rc = stream( areafile, 'c', 'open read' )
  40. rc = stream( outfile, 'c', 'open write' )
  41. Call SysCls
  42. starttime  = Time('E')
  43. startnr    = '1'
  44. oldstartnr = startnr
  45.  
  46.   Do While Lines(areafile)
  47.       line = LineIn(areafile)
  48.       parse var line keyword value
  49.   Select
  50.       When keyword = 'DLPATH' Then
  51.        path = strip(value)
  52.       When keyword = 'AREAEND' Then Do
  53.        Call LineOut outfile,path'\*.*'
  54.        startnr = startnr + 1
  55.        End
  56.       Otherwise
  57.        Nop
  58.     End
  59.   End
  60.  
  61. Back:
  62. totalnr = (startnr - oldstartnr)
  63. curtime = time('R')
  64. newtime = format(curtime,,2)
  65. Say ' '
  66. Say ' '
  67. Say 'Total: 'totalnr' File Areas and 'magicnr' MagicNames Processed'
  68. Say '       in 'newtime' seconds by MakeFreq.'
  69. Say ' '
  70. Say 'OutPut File : 'outfile
  71. Say ' '
  72. Say 'Thanks for using MakeFreq and have a Nice Day!'
  73. rc = stream( magicfile, 'c', 'close' )
  74. rc = stream( areafile, 'c', 'close' )
  75. rc = stream( outfile, 'c', 'close' )
  76.