home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR21 / LANLOG11.ZIP / REPTEG03.BAT < prev    next >
DOS Batch File  |  1993-08-01  |  3KB  |  106 lines

  1. ECHO OFF
  2. CLS
  3. rem     This BAT file provides an example use of LANLOG's report
  4. rem     generation utility LLREPORT.COM.
  5. rem
  6. rem           Title: Produce Meter file and Totalled report to files
  7. rem     Description: Runs LLREPORT.COM with a DOS parameter for meter
  8. rem                  file report and one for total file report.
  9.  
  10. rem     check to see user has provided a meter file report file
  11. rem     name.
  12.  
  13. if "%1"=="" goto error
  14.  
  15. rem     check to see user has provided a total file report file
  16. rem     name.
  17.  
  18. if "%2"=="" goto error
  19.  
  20. rem     they have provided file names perform reporting
  21.  
  22. :START
  23.  
  24. ECHO    ╔══════════════════════════════════════════════════════╗
  25. ECHO    ║     REPORTING METER DATA AND TOTALED DATA TO FILE    ║
  26. ECHO    ╠══════════════════════════════════════════════════════╣
  27. ECHO    ║                                                      ║
  28. ECHO    ║ This BATCH file produces two files, the first        ║
  29. ECHO    ║ contains a report of all meter files in the current  ║
  30. ECHO    ║ directory, the second a totaled report across all    ║
  31. ECHO    ║ those meter files.                                   ║
  32. ECHO    ║                                                      ║
  33. ECHO    ╚══════════════════════════════════════════════════════╝
  34.  
  35. rem     check for a total file delete if neccessary.
  36.  
  37. if exist LANLOG.TOT goto DELTOT
  38.  
  39. :REPT
  40.  
  41. rem     Run the LLREPORT.COM to produce first report and LANLOG.TOT
  42.  
  43. ECHO .
  44. ECHO .  Generating a report of all meter files to file:
  45. ECHO .
  46. ECHO .                  %1
  47. ECHO .
  48. ECHO .  Please be patient.....
  49.  
  50. LLREPORT *.MET /TOT > %1
  51.  
  52. rem     Note: this command presumes a copy of LLREPORT is present
  53. rem     in the current directory or that it can be found in your PATH
  54.  
  55. rem     Produce a report of the created totals file.
  56.  
  57. ECHO .
  58. ECHO .  Generating a totaled report for all meter files to file:
  59. ECHO .
  60. ECHO .                  %2
  61. ECHO .
  62. ECHO .  Please be patient.....
  63.  
  64. LLREPORT LANLOG.TOT > %2
  65.  
  66. goto QUIT
  67.  
  68. :DELTOT
  69.  
  70. del LANLOG.TOT > nul
  71.  
  72. goto REPT
  73.  
  74. :ERROR
  75.  
  76. rem     user didn't provide a command line parameter for created data
  77. rem     file name.
  78.  
  79. CLS
  80.  
  81. ECHO    ╔══════════════════════════════════════════════════════╗
  82. ECHO    ║                     SYNTAX ERROR                     ║
  83. ECHO    ╠══════════════════════════════════════════════════════╣
  84. ECHO    ║                                                      ║
  85. ECHO    ║ This BATCH file expects two parameters, the first is ║
  86. ECHO    ║ a file name for the meter file report, the second a  ║
  87. ECHO    ║ file name for the LANLOG.TOT file report.            ║
  88. ECHO    ║                                                      ║
  89. ECHO    ║ The correct syntax:                                  ║
  90. ECHO    ║                                                      ║
  91. ECHO    ║               REPTEG03 {name1} {name2}               ║
  92. ECHO    ║                                                      ║
  93. ECHO    ║ where {nameX} are any valid DOS path.                ║
  94. ECHO    ║                                                      ║
  95. ECHO    ║ Example:                                             ║
  96. ECHO    ║                                                      ║
  97. ECHO    ║           REPTEG03 ACCOUNTS.IND ACCOUNTS.ALL         ║
  98. ECHO    ║                                                      ║
  99. ECHO    ╚══════════════════════════════════════════════════════╝
  100.  
  101. rem     The End
  102.  
  103. :QUIT
  104.  
  105. ECHO ON
  106.