Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Cmd.exe
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Command separator=== Multiple commands can be included in a single line using the command separator {{code|&}} or {{code|&&}}.<ref name="docs.microsoft.com">{{Cite web|url=https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/cmd|title=cmd|website=Microsoft Learn |date=September 12, 2023 |url-status=live |archive-url=https://web.archive.org/web/20231121065635/https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/cmd |archive-date=November 21, 2023}}</ref> With the {{code|&}} separator, a subsequent command is executed even if the previous command indicates an error.<ref>{{Cite web|title=Command Redirection, Pipes - Windows CMD - SS64.com|url=https://ss64.com/nt/syntax-redirection.html|access-date=2021-09-23|website=ss64.com}}</ref> In the following example, each of the three commands is executed, one after the other, and regardless of their result code. <syntaxhighlight lang="doscon"> >CommandA & CommandB & CommandC </syntaxhighlight> With the {{code|&&}} separator, a command must complete successfully for the subsequent command to execute. In the following example, {{code|CommandB}} only executes if {{code|CommandA}} completes successfully, and {{code|CommandC}} only executes if {{code|CommandB}} also completes successfully. <syntaxhighlight lang="doscon"> >CommandA && CommandB && CommandC </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)