Created
January 30, 2020 06:04
-
-
Save joe-oli/d13bdf10f60ae161f4142c45501c745b to your computer and use it in GitHub Desktop.
starts cmd prompt, runs cmd, and remains open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Put in your batch file | |
start cmd.exe /k "net use" | |
From 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 | |
======== | |
FOR EXAMPLE, create a file `start-server.cmd` that you can click on from File Explorer; | |
------------------------------- | |
REM npx json-server --help or -h | |
REM --watch, -w | |
REM --port, -p | |
start cmd.exe /k "npx json-server -p 4000 --watch db.json" | |
------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment