The cmd or cmd.exe is the MS-DOS command prompt. The cmd is executed when the MS-DOS or command prompt started in Windows. The “cmd /c” is a popular usage where the “/c” is provided to execute a specified string as a command in MS-DOS. After the provided command execution is completed the created shell will be closed.
The “cmd /c” Syntax
The “cmd /c” syntax is like below.
cmd /c COMMAND
The cmd is used to execute MS-DOS commands. Actually, it is an interpreter that reads provided commands and interprets them, and as the last step executes them. The command is provided as a text. Even command text can be provided without a special sign using the double quotes is a very good best practice.
cmd /c "ping windowstect.com"
Run Multiple Commands with “cmd /c”
The “cmd /c” supports multiple commands in a single execution. We can provides multiple commands by putting them inside the double quotos and separating them with the spaces. In the following examle we will execute 3 commands.
cmd /c "ping windowstect.com" "mkdir test" "cd test"

本文介绍了`cmd/c`在Windows中用于执行MS-DOS命令的用法,特别是如何通过`cmd/c`一次性运行多个命令。通过在双引号内用空格分隔,你可以依次执行如`ping`、`mkdir`和`cd`等不同命令。
1152

被折叠的 条评论
为什么被折叠?



