1、
& command1 & command2 用来分隔一个命令行中的多个命令。Cmd.exe 运行第一个命令,然后运行第二个命令。
&& command1 && command2 只有在符号 && 前面的命令成功时,才用于运行该符号后面的命令。Cmd.exe 运行第一个命令,然后只有在第一个命令运行成功时才
运行第二个命令。
|| command1 || command2 只有在符号 || 前面的命令失败时,才用于运行符号 || 后面的命令。Cmd.exe 运行第一个命令,然后只有在第一个命令未能运行成
功(接收到大于零的错误代码)时才运行第二个命令。
( ) (command1 & command2) 用来分组或嵌套多个命令。
; 或者 , command1 parameter1;parameter2 用来分隔命令参数。
注意
“与”符号 (&)、管道符号 (|) 以及括号 () 是特殊字符,将它们作为参数传递时,必须在其前面加上转义字符 (^) 或引号。
如果某个命令成功完成操作,则该命令就返回零 (0) 退出代码或不返回任何退出代码。有关退出代码的详细信息,请参阅 Microsoft Windows Resource Kit。
2、
START
"title" 在窗口标题栏中显示的标题。
……
当filename为带空格的路径的时候,必须用引号把路径括起来,此时,为了避免start把路径当作标题,就在start和路径之间插入一个引号对来区别标题与路径。
1、
& command1 & command2 Used to separate multiple commands in a command line. Cmd.exe runs the first command and then the second command.
&& command1 && command2 Used to run the command after the && only if the command before the && is successful. Cmd.exe runs the first command and then runs the second command only if the first command runs successfully.
|| command1 || command2 Used to run the command after the || only if the command before the || fails. Cmd.exe runs the first command and then runs the second command only if the first command fails to run successfully (receives an error code greater than zero).
( ) (command1 & command2) Used to group or nest multiple commands.
; or , command1 parameter1;parameter2 Used to separate command parameters.
Note
The "and" symbol (&), pipe symbol (|), and parentheses () are special characters. When passing them as parameters, you must prefix them with the escape character (^) or quotes.
If a command successfully completes an operation, the command returns a zero (0) exit code or no exit code. For detailed information about exit codes, refer to the Microsoft Windows Resource Kit.
2、
START
"title" The title displayed in the window title bar.
……
When the filename is a path with spaces, you must enclose the path in quotes. At this time, in order to prevent start from treating the path as the title, insert a pair of quotes between start and the path to distinguish the title from the path.