home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / d / d-chk102.zip / CHECKIT.BAT next >
DOS Batch File  |  1993-03-27  |  2KB  |  68 lines

  1. @ECHO OFF
  2. CLS
  3. ECHO  .
  4. ECHO  .
  5. ECHO This is a trial BATCH file to illustrate how to use D-CHK.EXE
  6. ECHO  .
  7. ECHO At the DOS prompt you should have typed "CHECKIT FILE_1 FILE_2"
  8. ECHO   where
  9. ECHO        FILE_1 is the name of the first file,
  10. ECHO        FILE_2 is the name of the second file.
  11. ECHO  .
  12. ECHO If the file(s) are not in the current directory, include the
  13. ECHO path(s) to the file(s).
  14. ECHO  .
  15. ECHO  .
  16. ECHO The name you typed for FILE_1 was  " %1 "
  17. ECHO The name you typed for FILE_2 was  " %2 "
  18. ECHO .
  19. PAUSE
  20. CLS
  21. ECHO D-CHK will now be called with the following command llne:
  22. ECHO  .
  23. ECHO D-CHK %1 %2
  24. ECHO .
  25. PAUSE
  26. CLS
  27. ECHO D-CHK %1 %2 %3 %4
  28. D-CHK %1 %2 %3 %4
  29. echo  .
  30. echo  .
  31. ECHO  .
  32. ECHO  Now back in the CHECKIT.BAT program.
  33. ECHO  .
  34. ECHO  The D-CHK program returned the following errorlevel:
  35. IF ERRORLEVEL 5 GOTO 5
  36. IF ERRORLEVEL 4 GOTO 4
  37. IF ERRORLEVEL 3 GOTO 3
  38. IF ERRORLEVEL 2 GOTO 2
  39. IF ERRORLEVEL 1 GOTO 1
  40. ECHO  The ERRORLEVEL returned was 0
  41. ECHO  The TIME/DATES of the files are the same.
  42. GOTO END
  43. :6
  44. ECHO  The ERRORLEVEL returned was 6
  45. GOTO END
  46. :5
  47. ECHO  The ERRORLEVEL returned was 5
  48. ECHO  A command line error has occured
  49. ECHO  in calling the D-CHK program.
  50. GOTO END
  51. :4
  52. ECHO  The ERRORLEVEL returned was 4
  53. ECHO  File_1 could not be opened.
  54. GOTO END
  55. :3
  56. ECHO  The ERRORLEVEL returned was 3
  57. ECHO  File_2 could not be opened.
  58. GOTO END
  59. :2
  60. ECHO  The ERRORLEVEL returned was 2
  61. ECHO  File_2 is older than File_1
  62. GOTO END
  63. :1
  64. ECHO  The ERRORLEVEL returned was 1
  65. ECHO  File_1 is older than File_2
  66. :END
  67. ECHO  .
  68.