Iterate all files in a directory using a 'for' loop

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 fichier batch vous devez double the % signs.

for /r %%i in (*) do echo %%i

(thanks @agnul)