Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我执行以下循环时,%%a 中的值未正确设置为 Result1。我应该怎么做才能纠正这个?
for /r %%i in (*.dll) do ( echo %%i set Result1= for /F "delims=" %%a in ('corflags "%%i" ^| findstr "PE32"') do set Result1=%%a echo %Result1% )
问题在于批处理解释脚本的方式。您应该启用并使用延迟扩展: