- 具体代码
@ECHO OFF
ECHO -
for %%i in (Office.exe      ^
            TPlayerCore.dll ^
           ) ^
do (
    ECHO 1=%%i
    SET WORK_FILE=%%i
    ECHO Sign %WORK_FILE% now!
    ECHO 2=%%i
    
    ECHO -
)- 实际输出
-
1=Office.exe
Sign TPlayerCore.dll now!
2=Office.exe
-
1=TPlayerCore.dll
Sign TPlayerCore.dll now!
2=TPlayerCore.dll
-其中的SET一句出问题了。
- 避错办法
不要在SET中使用%%i,直接使用%%i。
没有找到其他更好的办法。

 
                 
    