O'Reilly logo

Microsoft® Windows® Scripting Self-Paced Learning Guide by Ed Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required