About 6,090,000 results
Open links in new tab
  1. For - Looping commands - Windows CMD - SS64.com

    FOR - Loop through a set of files in one folder or a list of folders.

  2. How do you loop in a Windows batch file? - Stack Overflow

    Aug 31, 2009 · Please note it works directly in cmd only, don't work in a batch file. For batch you should double %: FOR %%A in (1, 2, 3, 4, 5) DO ECHO %%A

  3. for | Microsoft Learn

    Oct 5, 2023 · For simple batch files, a single character such as %%f will work. You can use multiple values for variable in complex batch files to distinguish different replaceable variables.

  4. The For Loop in Batch Script - Delft Stack

    Mar 11, 2025 · This comprehensive tutorial explores the FOR loop in batch scripts, showcasing its versatility for automating tasks in Windows. Learn how to process files, handle command line …

  5. Batch files - FOR loops - Rob van der Woude

    In this example, command will be executed once for every element in list, using parameters if specified. A special type of parameter (or even command) is %A, which will be substituted by each element …

  6. How to Create an Infinite Loop in Windows Batch File?

    Jul 12, 2025 · This guide will walk you through how to create an infinite loop in a Windows batch file using simple commands. Whether you're new to scripting or just need a quick refresher, you'll find …

  7. Windows Command Prompt For Loops - ZetCode

    Jul 14, 2025 · For loops can be used both directly in command prompt and in batch files. This tutorial covers all for loop variants with practical examples. We'll explore file processing, numeric iteration, …

  8. Master The For Loop In Your Bat File: Step-By-Step Guide

    Jul 22, 2025 · Imagine you must print names on a list. Instead of writing each name one by one, you can use a for loop. This saves time and effort! Isn’t it cool how one simple line of code can perform a big …

  9. Batch File For Loop - Implementation And Explanation

    In this tutorial, you will learn about the batch file for loop. Looping means going through something continuously until some condition is satisfied.

  10. windows - Batch script loop - Stack Overflow

    DOS doesn't offer very elegant mechanisms for this, but I think you can still code a loop for 100 or 200 iterations with reasonable effort. While there's not a numeric for loop, you can use a character string …