choice

12 Results

Dictionary

Choice

A Windows command that allows a batch file to include multiple tasks and lets the user choose which one to perform. Choice accepts a single character as input. The syntax varies between Windows...

Dictionary

Definition: Choice

A Windows command that allows a batch file to include multiple tasks and lets the user choose which one to perform. Choice accepts a single character as input. The syntax varies between Windows versions; however, the following three-character example works in Windows Vista, 7 and 8. See batch file abc's.

  @echo off
  choice /c abc
  if errorlevel 3 goto thingc
  if errorlevel 2 goto thingb
  (do thing A here)
  goto end
  :thingb
  (do thing B here)
  goto end
  :thingc
  (do thing C here)
  :end


The allowable characters follow the /c, and the example above prompts the user with [A, B, C]?. If any other character is entered, the computer beeps. The input character is stored as an error level: "a" becomes error level 1; "b" is 2, etc.



Sponsored White Papers, Webcasts & Resources

  • For the blind, Apple iPhone has become phone of choice

    The undisputed phone of choice for the visually impaired is the Apple iPhone. Here's why.

    Blog posts | June 9, 2010 3:39am PDT

  • Android phones dominate CTIA: Is Apple a 1-trick pony?

    With 115 phones either on or near the market, Android is poised to offer Apple a real run for its money. Got competition?

    Blog posts | March 24, 2010 10:28am PDT

  • Microsoft offers a Sophie's Choice

    You can argue that Microsoft and open source are two equally valid choices, of course, by noting that the choice has been made already. But because you can see the code, and change the code, with...

    Blog posts | March 11, 2010 5:44am PST

  • 10 bits of tech to get for the back-to-school student

    Time is inching its way through the season, and is now slowly approaching the back-to-school month. With only a few weeks to go until you pack up your things, get dropped off by your parents or...

    Blog posts | August 10, 2009 4:12am PDT

  • Oops, this is happening faster than predicted

    Greenhouse gases, especially carbon dioxide are accumulating faster than predicted. Now scientists are saying that global warming is going to happen much faster than the current U.N. commission's...

    Blog posts | February 16, 2009 9:34pm PST

  • Does open source need a Micro-cop?

    Microsoft's idea is that you can have its system or be exiled to the woods, with its choices and risks. Especially the risk that your vendor of choice will go toes-up, leaving you like Little Red...

    Blog posts | March 25, 2008 10:55am PDT

  • Linux is like ice cream -- too many flavors to choose

    Remember when you could travel pretty much anywhere in America and there would always be a Howard Johnson's nearby?  (No?  Maybe most of you are too young to remember those days.)  Their tag...

    Blog posts | November 5, 2007 11:44am PST

  • Back to the "too many Linux distros" debate

    Over on Slashdot today I came across yet another "too many Linux distros" debate, this time started by Alexander Wolfe of InformationWeek. While I think that Wolfe has a point, he also misses the...

    Blog posts | July 19, 2007 10:40am PDT

  • The paradox of choice

    At Release 1.0's PC Forum 2006 in Carlsbad, Calif., Barry Schwartz, the author of "The Paradox of Choice," talks about why greater freedom and more choices often make us feel worse.

    Videos | March 28, 2006 6:06pm PST

  • J2EE or .Net? Making that vital development decision

    Making that all-important choice between J2EE and .Net can be a career-defining decision. Here's how to make the right choice by examining the companies and the markets.

    News items | June 20, 2002 12:00am PDT

  • Leave everything to me... not!

    Should OS vendors limit your choices?

    News items | April 17, 2001 12:00am PDT

Additional Results

ie8 fix

The best of ZDNet, delivered

ZDNet Newsletters

Get the best of ZDNet delivered straight to your inbox

Facebook Activity

ie8 fix