自己写的第二个实用批处理文件^^ @echo off set input=%2 set outpu=%1 set wdir=%cd% set output=%outpu%.exe cls if == (set output=out.exe) if =={} (set input=%outpu%.cs) if == goto inse if not exist %input% goto ine if exist %output% del %output% pushd %windir%\Microsoft.NET\Framework\v1.1.4322\ csc/out:%wdir%\%output% %wdir%\%input%>%wdir%\err.txt popd type err.txt goto end :inse echo +-----------------------+-----------------------------+ echo 请输入的要求输出的文件名,注意,不要带exe后缀,退出! echo +-----------------------+-----------------------------+ goto end :ine echo +-----------------------+-----------------------------+ echo +在%wdir%中不存在%input%,无法继续,退出!+ echo +-----------------------+-----------------------------+ goto end :end
|