For Loop through Files
To loop through files using the for loop, you must use % followed by a single letter, such as %a.
Example
An example of a for loop for looping through files at a given location.
for %a in (D:\documents\*) do @echo %aLearn how to use the for loop in Windows batch scripts to iterate through files in a directory with syntax like for %a in (path\*) do command.
To loop through files using the for loop, you must use % followed by a single letter, such as %a.
An example of a for loop for looping through files at a given location.
for %a in (D:\documents\*) do @echo %a