About 1,120,000 results
Open links in new tab
  1. How to do a for loop in windows command line? - Stack Overflow

    Jun 25, 2012 · You can use different modifiers to get it in different formats. I updated the answer to describe that filespec can include a different directory, so you can specify a particular …

  2. For - Looping commands - Windows CMD - SS64.com

    FOR - Loop through a set of files in one folder or a list of folders. FOR /R - Loop through files (recurse subfolders) . FOR /D - Loop through several folders.

  3. FOR loop in Windows - Windows Command Line

    Aug 14, 2010 · Learn how to use for command to iterate over a list of items and run commands on each of them. We can run a command for each file in a directory, for example. The simplest …

  4. windows - Batch script loop - Stack Overflow

    Code the loop using GOTO, and for each iteration use SET X=%X%@ to add yet another @ sign to an environment variable X; and to exit the loop, compare the value of X with a string of 100 …

  5. For /f - Loop through text - Windows CMD - SS64.com

    Loop command: against a set of files - conditionally perform a command against each item. Syntax FOR /F [" options "] %% parameter IN ( filenameset ) DO command FOR /F [" options …

  6. for /d - Loop through directory - Windows CMD - SS64.com

    To loop through each folder programatically, we can wrap that in a FOR /F command: C:\> for /f "tokens=*" %G in ('dir /b /s /a:d "C:\Work\reports*"') do echo Found %G. or the same thing in a …

  7. for loop - Looping through string values from a windows

    I am trying to create a batch script for my Windows machine that loops through a list of (string/decimal) values and uses each value as a parameter inside the loop. Below is an …

  8. Exploring the 'for' Command in Windows Command Prompt

    Dec 17, 2024 · It allows for looping over sets, ranges, files, and directories, making it a powerful utility for automating repetitive tasks. This command can be used in batch files or directly in …

  9. 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 …

  10. How to Use PowerShell For Loop, While Loop, and Other Loops

    May 23, 2022 · In this article, we will review PowerShell For loops, While loops, Do-While loops, and Do-Until loops. I’ll explain how PowerShell loops are constructed and how to define …

Refresh