快捷搜索:   服务器  安全  linux 安全  MYSQL  dedecms

调用CSC编译器的一个批处理文件

    自己写的第二个实用批处理文件^^


    @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

顶(0)
踩(0)

您可能还会对下面的文章感兴趣:

最新评论