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"