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 Until...Loop

As you know by now, Do Loop allows the script to continue to perform certain actions until a specific condition occurs. Do While...Loop allows your script to continue to perform these actions as long as the specified condition remains true. Once the specified condition is no longer true, Do While...Loop exits. In contrast, the Do Until...Loop has the opposite effect—the script continues to perform the action until a certain condition is met.

"So what?" you might ask. In and of itself, Do Until is not all that exciting, but you can use it to perform certain tasks. Here are common uses of Do Until:

  • Read text from a file

  • Read through records in a record set

  • Create a looping condition for monitoring purposes

Each of these implementations ...

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