• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 6. The Command Console > Execute a command from a shortcut but have the...

6.9. Execute a command from a shortcut but have the window remain open

When you execute a shortcut associated with a console command (xcopy , dir , etc.) the command executes and the console windows closes on completion. This means you can't see the results of the command. In many cases you probably will want to keep the window open, if for no other reason than to verify that the command performed its intended function without errors.

6.9.1. Run the application using a shortcut to cmd /k

Rather than execute the command from a shortcut to its own executable, create a shortcut to cmd.exe with the /k switch that will keep the window open when the command completes execution.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint