2010-06-25 82 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看。