2010-06-25 80 views

回答

5

使用%%〜nf。

for %%f in (*.asmx.cs) do (
    echo %%~nf 

    cmd /c C:\windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /t:library /r:%assemblies% %compileoptions% /out:bin/%%~nf.dll %%f 
) 

对于像%%〜NF'变量的完整列表,请在命令行中运行for /?,或在线here看。