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

For...Next

I know what you’re thinking: "We just got finished looking at For...Next!" Well, sort of, but not really. An important difference between For Each...Next and For...Next is that with For Each...Next, you don’t have to know how many times you want to do something. With the For...Next construct, you must know exactly how many times you want to do something. Using For...Next is not necessarily a bad thing, however, because it gives you a lot of extra control. For example, the next script checks a number of performance indicators on the server (that is, process thread counts, page faults, working set sizes, and the like). The values for these items can change quite often, so you want to check them on a regular basis. However, frequent checking ...

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