If you use file and directory name completion on any of the built-in directory commands (that is, CD, MD, or RD ), directory completion is assumed. If you want the cmd window to stay opened after running your commands you can replace the /c with /k. The only difference between the key combinations CTRL+D and CTRL+F is that CTRL+D only matches directory names and CTRL+F matches both file and directory names. The /c will make it run your commands and then close the cmd window automatically.
Using this option will result in a command like this: /c cd path & vpnclient. Using the & symbol makes cmd.exe execute the two commands sequentially (See here for an overview of the available symbols).
![cmd c multiple commands cmd c multiple commands](https://thecustomizewindows.com/wp-content/uploads/2013/02/Managing-Multiple-SSH-Keys-Through-Command-Line.png)
& java moExe, the command window will not execute the command. Which, predictably, did not work well at all.Ĭdcommand = the the variable containing "cd PATH_TO_CD_TO", and MencoderCommand = the main command I'm trying to pass the command prompt. You separate each command with an & sign. The third option is to combine the two commands with the & symbol. Process ps Runtime.getRuntime().exec(cmd.exe /c start cd. OpenMencoder = Shell("cmd.exe", AppWinStyle.NormalFocus) Which still doesn't work, and finally Dim MenCoder ObjShell.Run(MencoderLocation & "/k" & MencoderCommand & " /k exit", 0, 1) WSH.Run(cdcommand & "/K" & MencoderCommand & "/K" & " exit /K", 0, 1) Any help with this will be very much appreciated. I have tried with the following code, but nothing is working for me (I am using Visual Basics Express 2010 VB6).
![cmd c multiple commands cmd c multiple commands](https://i.ytimg.com/vi/WkQDBd4K3zk/maxresdefault.jpg)