Summary

In this chapter, you saw the power that you can bring to scripts by using looping types of constructs. Tools such as For...Next, which perform specified operations a certain number of times, allow you to easily perform repetitive actions. As you saw in several script examples, For...Next and For Each...Next are often used in tandem to walk through collections of information and to perform actions together and in tandem. You are not, however, limited to just manual counting through collections. You can also devise looping conditions that will monitor until a condition either becomes true or ceases to be true by using either Do While or Do Until. These two commands are often used to read through a record set or a text file. Along the way, ...

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.