home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / a2mfv10.zip / A2MF.Cmd next >
OS/2 REXX Batch file  |  1996-01-11  |  2KB  |  53 lines

  1. /* ************************************* */
  2. /* ┌───────────────────────────────────┐ */
  3. /* │ ╓──┐╥   ─╥─ ╥──┐╓──┐╓──┐╥──┐╓─╥─┐ │ */
  4. /* │ ║   ║    ║  ╟──┘╙──┐║  │╟─    ║   │ */
  5. /* │ ╙──┘╨──┘─╨─ ╨   ╙──┘╙──┘╨     ╨   │ */
  6. /* │ ────═════   A2MF v1.0   ═════──── │ */
  7. /* │                                   │ */
  8. /* │A2MF is a utility for AdeptXBBS to │ */
  9. /* │convert File_Areas -> areas.cfg so │ */
  10. /* │its possible to edit the files.bbs │ */
  11. /* │with Maxfile/PM.                   │ */
  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. areafile = '\adept\system\file_areas'
  21. outfile = 'areas.cfg'
  22. areas = '1'
  23.  
  24. rc = stream( areafile, 'c', 'open read' )
  25. rc = stream( outfile, 'c', 'open write' )
  26. Call LineOut outfile,"AreaCount      "
  27.        
  28.   Do While Lines(areafile)
  29.       line = LineIn(areafile)
  30.       parse var line keyword value
  31.   Select
  32.       When keyword = 'NUMBER' Then Do
  33.        num = strip(value)
  34.        areas = areas + 1
  35.       End
  36.  
  37.       When keyword = 'DESC' Then
  38.        desc = strip(value)
  39.  
  40.       When keyword = 'DLPATH' Then
  41.        dlpath = strip(value)
  42.  
  43.       When keyword = 'AREAEND' Then
  44.        Call LineOut outfile, Left(num,6)''dlpath' 'dlpath'\files.bbs 'desc
  45.       Otherwise
  46.        Nop
  47.     End
  48.   End
  49.  
  50. Call Lineout outfile,'AreaCount 'areas,1
  51. rc = stream( areafile, 'c', 'close' )
  52. rc = stream( outfile, 'c', 'close' )
  53.