美文网首页
How To:Bat - Windows批处理文件

How To:Bat - Windows批处理文件

作者: ethnchao | 来源:发表于2016-08-21 10:04 被阅读13次

    How to create a blank line in a batch file

    @echo off
    echo 
    There will be a blank line below
    echo.
    echo Above line is blank
    echo[
    echo The above line is also blank.
    

    Escape Characters

    Character to be escaped Escape Sequence Remark
    % %% May not always be required in doublequoted strings, just try
    ^ ^^ -
    & ^& -
    < ^< -
    > ^> (From ^ ~ >) May not always be required in doublequoted strings, but it won't hurt
    ' ^' Required only in the FOR /F "subject" (i.e. between the parenthesis), unless backq is used
    ` ^` Required only in the FOR /F "subject" (i.e. between the parenthesis), if backq is used
    , ^, -
    ; ^; -
    = ^= -
    ( ^( -
    ) ^) Required only in the FOR /F "subject" (i.e. between the parenthesis), even in doublequoted strings
    ! ^^! Required only when delayed variable expansion is active
    " "" Required only inside the search pattern of FIND
    \ \\ -
    [ \[ -
    ] \] -
    " " -
    . \. -
    * \* -
    ? ? Required only inside the regex pattern of FINDSTR

    Extras:
    | Can use ^| to escape.

    *literal asterisks*

    相关文章

      网友评论

          本文标题:How To:Bat - Windows批处理文件

          本文链接:https://www.haomeiwen.com/subject/qcaisttx.html