Iterate all files in a directory using a 'for' loop
Iterate all files in a directory using a 'for' loop
Iterate all files in a directory using a 'for' loop
Re: Iterate all files in a directory using a 'for' loop
This lists all the files (and only the files) in the current directory and its subdirectories recursively:
```
for /r %i in (*) do echo %i
```
Also if you run that command in a batch file you need to double the % signs.
```
for /r %%i in (*) do echo %%i
```
(thanks @agnul)
```
for /r %i in (*) do echo %i
```
Also if you run that command in a batch file you need to double the % signs.
```
for /r %%i in (*) do echo %%i
```
(thanks @agnul)