home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / batutl / battutor.arc / _QUERY.BAT < prev    next >
DOS Batch File  |  1983-08-21  |  2KB  |  64 lines

  1. echo off
  2. .                                 _query.bat    revised 15-aug-83 17:00
  3. more <_query.rem
  4. slash/l
  5. pause
  6. :start
  7. slash/l
  8. query  Is this example easy (y/n) ?
  9. if errorlevel 2 goto esc_key
  10. if not errorlevel 1 goto n_key
  11. echo    You typed a "Y" or a "y"
  12. goto continue
  13. :n_key
  14. echo    You typed an "N" or an "n"
  15. goto continue
  16. :esc_key
  17. echo    You pressed the Esc key
  18. :continue
  19. slash/lll
  20. echo    In the next few examples, we're just going to show some different
  21. echo    forms of the QUERY command line, so we won't bother to do any testing
  22. echo    with IF subcommands.  Just put a finger on the "N" key and tap it
  23. echo    as each example prompt appears.
  24. echo    (or, to see QUERY's error message, type another key).
  25. slash/lll
  26. echo    We first show the command line in a comment, then we execute it.
  27. slash/ll
  28. echo    Command line:   query   Type y/n to continue :
  29. query   Type y/n to continue :
  30. slash/l
  31. echo    Command line:   query /l/We skipped one line before this prompt :
  32. query /l/We skipped one line before this prompt :
  33. echo    Command line:   query /llb/We skipped two lines and beeped :
  34. query/llb/We skipped two lines and beeped :
  35. echo    Command line:   query      No slashes, so leading blanks are gone  :
  36. query      No slashes, so leading blanks are gone  :
  37. slash/l
  38. echo    Command line:   query //                     But slashes keep them :
  39. query //                     But slashes keep them :
  40. slash/l
  41. echo    Command line:   query/ldl/  Delimiting helps keep display organized  :
  42. query/ldl/ Delimiting helps keep display organized  :
  43. slash/lll
  44. echo    You may leave out the prompt string altogether ( but a suitable prompt
  45. echo    should be displayed in preceding comments ).
  46. slash/ll
  47. echo    For example, let's execute the command line:    query
  48. query
  49. slash/ll
  50. echo    And here's the execution of the command line:   query /LLB
  51. query /LLB
  52. slash/llll/         If you want to repeat these examples, type "y"
  53. query  /l /         Else type "n" to continue   :
  54. if errorlevel 2 goto exit
  55. if errorlevel 1 goto start
  56. _funky.bat
  57. :exit
  58. slash/ll/               Bye bye
  59. 
  60.          ---
  61. goto    lookmore
  62. :exit
  63. slash/11/        Bye bye
  64.