Do While...Loop

The Do While...Loop allows you to run a script as long as a certain condition is in effect. If you were in Kauai, the Do While...Loop might look like this:

Do While sun_is_shining
    Surf
Loop

Do While...Loop means that as long as the specified condition remains true, the listed action continues to perform—it just loops around and around. In our silly preceding example, as long as the sun is shining, we surf. (Not a bad way to spend an afternoon.)

Get Microsoft® Windows® Scripting Self-Paced Learning Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.