|It's an interesting question ... I think you have to use /F instead of /R, basically to allow a command to be used. The problem with the "set" is that it is meant for standard behaviour, which is not what you want. I came to this :|
for /F %%f in ('dir *.* /B /S /AH') do echo %%f
It does look for files in subdirs, and it does show the hidden ones ... but the problem is then this : it only shows the hidden ones. So, you would have to run this as well (for the non-hidden files) :
for /F %%f in ('dir *.* /B /S /A-H') do echo %%f
which should be the same as:
for /F %%f in ('dir *.* /B /S') do echo %%f
It also shows the full path, so no issue with file not being found cause you run it from different path or so.