A loop is a software program or script that repeats the same instructions or processes the same information over and over until receiving the order to stop. If not handled properly, a loop can cause the computer to become slower as it becomes overwhelmed with repeating the same steps in an endless loop.
Batch file loop
Below is a basic example of a loop in a batch file.
:BEGIN Echo Here is an endless loop! GOTO BEGIN
Other types of loops
Below are examples of common types of loops in many programming languages. Visit each of these pages for additional information and examples about each loop.