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

  1. /* ************************************* */
  2. /* ┌───────────────────────────────────┐ */
  3. /* │ ╓──┐╥   ─╥─ ╥──┐╓──┐╓──┐╥──┐╓─╥─┐ │ */
  4. /* │ ║   ║    ║  ╟──┘╙──┐║  │╟─    ║   │ */
  5. /* │ ╙──┘╨──┘─╨─ ╨   ╙──┘╙──┘╨     ╨   │ */
  6. /* │ ────═════  CF2AM v1.0   ═════──── │ */
  7. /* │                                   │ */
  8. /* │CF2AM is a utility for AdeptXBBS to│ */
  9. /* │converts fast and easy:            │ */
  10. /* │    Fidonet.na -> Message_Areas    │ */
  11. /* │    Fidonet.na -> Areas.Control    │ */
  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. /* ************************************* */
  21. /*  Begin of the Configuration Section   */
  22. /* ************************************* */
  23.  
  24. AREAFILE = 'Fidonet.na'        /*  Name of Fido fidonet.na file           */
  25.  
  26. MOUTFILE = 'Message_Areas'     /*  Name of the Message_Areas output file  */
  27. AOUTFILE = 'Area.Control'      /*  Name of the Area.Control output file   */
  28.  
  29. STARTNR  = '100'               /*  nr of area to start with               */
  30. MORIGIN  = 'ClipArT BBS (31-172-439373 - 31-172-410373)'/*  origin line   */
  31. MRSEC1   = '30'                                   /*  Read  Security 1    */
  32. MRSEC2   = '30'                                   /*  Read  Security 2    */
  33. MWSEC1   = '50'                                   /*  Write Security 1    */
  34. MWSEC2   = '50'                                   /*  Write Security 2    */
  35. MSSEC1   = '100'                                  /*  Sysop Security 1    */
  36. MSSEC2   = '100'                                  /*  Sysop Security 2    */
  37. MFLAGS   = '100'                                  /*  Message Area Flags  */
  38. MYADDRESS = '2:281/602.0@FidoNet'                 /*  My Address          */
  39. EXADDRESS = '2:281/631.0@FidoNet'                 /*  Export Address      */
  40.  
  41. /* ************************************* */
  42. /*  *END* of the Configuration Section   */
  43. /* ************************************* */
  44.  
  45. Call SysCls
  46. rc = stream( areafile, 'c', 'open read' )
  47. rc = stream( moutfile, 'c', 'open write' )
  48. rc = stream( aoutfile, 'c', 'open write' )
  49.  
  50. oldstartnr = startnr
  51. starttime = time('E')
  52.  
  53.     check = lines(areafile)
  54.     Do While check > 0
  55.     line = LineIn(areafile)
  56.     aname = substr(line,1,20)
  57.     adesc = substr(line,21,57)
  58.      Call LineOut moutfile,'AREABEGIN'
  59.      Call LineOut moutfile,'  NAME     'aname
  60.      Call LineOut moutfile,'  NUMBER   'startnr
  61.      Call LineOut moutfile,'  DESC     'adesc
  62.      Call LineOut moutfile,'  ORIGIN   'morigin
  63.      Call LineOut moutfile,'  RSEC1    'mrsec1
  64.      Call LineOut moutfile,'  RSEC2    'mrsec2
  65.      Call LineOut moutfile,'  WSEC1    'mwsec1
  66.      Call LineOut moutfile,'  WSEC2    'mwsec2
  67.      Call LineOut moutfile,'  SSEC1    'mssec1
  68.      Call LineOut moutfile,'  SSEC2    'mssec2
  69.      Call LineOut moutfile,'  FLAGS    'mflags
  70.      Call LineOut moutfile,'  ADDRESS  'MyAddress
  71.      Call LineOut moutfile,'AREAEND'
  72.      Call LineOut Aoutfile,'ECHO 'aname' 'startnr'   'ExAddress
  73.      Say 'Writing Out Msgs Area -> 'startnr
  74.      startnr = startnr + 1
  75.     check = lines(areafile)
  76.     End
  77.  
  78. Back:
  79. totalnr = (startnr - oldstartnr)
  80. curtime = time('R')
  81. newtime = format(curtime,,2)
  82. Say ' '
  83. Say ' '
  84. Say 'Total of 'totalnr' Areas processed in 'newtime' seconds by CF2AM.'
  85. Say ' '
  86. Say 'OutPut Message_Areas  : 'moutfile
  87. Say 'OutPut Area.Control   : 'aoutfile
  88. Say ' '
  89. Say 'Thanks for using CF2AM and have a Nice Day!'
  90. rc = stream( areafile, 'c', 'close' )
  91. rc = stream( moutfile, 'c', 'close' )
  92. rc = stream( aoutfile, 'c', 'close' )
  93.