for /r %%i in (*) do (echo %%i)
结果是
%%i was unexpected at this time
为什么?
您必须尝试从命令行运行命令,而不是从批处理文件中运行命令.从命令行运行时,使用单个%而不是两个.
原文链接:https://www.f2er.com/windows/370634.htmlfor /r %i in (*) do (echo %i)
从命令行输入HELP FOR并阅读第3段.