Question

  • Creator
    Topic
  • #2266497

    Some DOS commands not supported in Win2000

    Locked

    by sajithmenon27 ·

    Hi everybody,

    i’m not able to use DOS commands like
    1:CHOICE
    2:GO TO

    It says “‘choice’ is not recognized as an internal or external command,
    operable program or batch file.”

    I think i need to update the dos version.
    Can anybody post me the link for updating it or maybe there’s some other option available.

All Answers

  • Author
    Replies
    • #2584561

      Clarifications

      by sajithmenon27 ·

      In reply to Some DOS commands not supported in Win2000

      Clarifications

    • #2584517

      Loosing DOS

      by thechas ·

      In reply to Some DOS commands not supported in Win2000

      With each new versions of Windows starting with Windows 95, we have been loosing DOS commands and functions.

      The choice command is not available in Windows 2000.

      Goto should work though.

      Microsoft articles:

      http://support.microsoft.com/kb/225746

      http://www.microsoft.com/windows/windows2000/en/advanced/help/ntcmds.htm

      Chas

    • #2584499

      Here is an alternative

      by rob miners ·

      In reply to Some DOS commands not supported in Win2000

      :: I modified this file to open Notepad.exe as an example.
      :: Cut Below and rename the file to menu.bat
      ============================================================


      @ECHO
      OFF
      CLS
      :LOOP
      :: ECHO A. Menu item A
      ECHO A. NOTEPAD
      ECHO B. Menu item B
      ECHO C. Menu item C
      ECHO Q. Quit
      :: SET /P prompts for input and sets the variable
      :: to whatever the user types
      SET Choice=
      SET /P Choice=Type the letter and press Enter:
      :: The syntax in the next line extracts the substring
      :: starting at 0 (the beginning) and 1 character long
      IF NOT ‘%Choice%’==” SET Choice=%Choice:~0,1%
      ECHO.
      :: /I makes the IF comparison case-insensitive
      IF /I ‘%Choice%’==’A’ GOTO NOTEPAD
      IF /I ‘%Choice%’==’B’ GOTO ItemB
      IF /I ‘%Choice%’==’C’ GOTO ItemC
      IF /I ‘%Choice%’==’Q’ GOTO End
      ECHO “%Choice%” is not valid. Please try again.
      ECHO.
      GOTO Loop
      :NOTEPAD
      :: ECHO Insert commands for Item A.
      C:\WINDOWS\NOTEPAD.EXE
      GOTO Again
      :ItemB
      ECHO Insert commands for Item B.
      GOTO Again
      :ItemC
      ECHO Insert commands for Item C.
      GOTO Again
      :Again
      PAUSE
      CLS
      GOTO Loop
      :End

Viewing 2 reply threads