for /r %%i in (*) do (echo %%i)
Results in
%%i was unexpected at this time
Why?
Syntax:
FOR /R [[drive:]path] %%parameter IN (set) DO command
Need the path before %%i... which is why it's Unexpected
Unexpected
If you want to do * for current directory, just use ".\" for the path
*
for /r ".\" %%i in (*) do (echo %%i)