Batchography: How to do a “switch/case” in Batch files

You have found this blog post because you are wondering if there is a way to express a “switch/case” logic in Batch files.

The short answer is NO, not exactly. However, there are ways to achieve the same in Batch files.

In the Batchography book, I explain in details the “switch/case” construct, but in this blog post I will illustrate this mechanism briefly. For more advanced Batch scripting topics, please grab a copy of the Batchography book.


Get the book from Amazon:

  • Paperback¬†editionbtn-buy-on-amazon
  • E-book editionbtn-buy-on-amazon

flower separator Continue reading