相关文章推荐
气势凌人的打火机  ·  使用Excel 365 ...·  2 月前    · 
绅士的酱牛肉  ·  module 'cv2' has no ...·  2 月前    · 
瘦瘦的小熊猫  ·  java - Converting odt ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams To Moderators, is there a provision to move this to appropriate portal/subsidiary of stack overflow. That way this item will not be closed and users will be able to contribute more? I guess this should go to something similar to super user? digitally_inspired Jul 25, 2018 at 16:14

The part you should be interested in is the /? part, which should solve most other questions you have with the tool.

Microsoft Windows XP [Version 5.1.2600] C:\>cmd /? Starts a new instance of the Windows XP command interpreter CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF] [[/S] [/C | /K] string] /C Carries out the command specified by string and then terminates /K Carries out the command specified by string but remains /S Modifies the treatment of string after /C or /K (see below) /Q Turns echo off /D Disable execution of AutoRun commands from registry (see below) /A Causes the output of internal commands to a pipe or file to be ANSI /U Causes the output of internal commands to a pipe or file to be Unicode /T:fg Sets the foreground/background colors (see COLOR /? for more info) /E:ON Enable command extensions (see below) /E:OFF Disable command extensions (see below) /F:ON Enable file and directory name completion characters (see below) /F:OFF Disable file and directory name completion characters (see below) /V:ON Enable delayed environment variable expansion using ! as the delimiter. For example, /V:ON would allow !var! to expand the variable var at execution time. The var syntax expands variables at input time, which is quite a different thing when inside of a FOR loop. /V:OFF Disable delayed environment expansion. there's also a command to "pause" the cmd window after output: "cmd /c file_name & PAUSE" it is bit different from cmd /k GorvGoyl Sep 5, 2015 at 19:34 what if a given command is kind of a server that starts it's own loop? should we use /C or /K? redpix_ Mar 27, 2017 at 20:21 While executing command in C# via 'Process' is using /C mandatory in Windows 7 or Windows Server 2008 R2 operating system? Dinesh Kumar P Jun 12, 2017 at 11:14 I came here becasue its not behaving as described. Im runnig from git bash and cmd /c "dir" or any command will just leave me in cmd prompt without executing the ocmmand. Brad Oct 23, 2020 at 22:44 But why would one want to? Why not just call the command directly, like "java helloworld" Mike Sadler Apr 11, 2019 at 11:04 because you might not be in CMD but you just wan to use cmd to execute a command for you. eg I am running a bash script and want it to execute a command that cmd can do but bash can not. Brad Oct 23, 2020 at 22:58 My code not executing command code its only shows the command prompt but it doesn't execute the command See more linked questions