cmd /C
Including the /C switch on the cmd invocation feeds the rest of the batch file as commands to be executed in the new prompt.
Showing posts with label batch. Show all posts
Showing posts with label batch. Show all posts
Monday, December 7, 2009
Tuesday, November 24, 2009
Start a command-line prompt in a specific directory (XP)
I got tired of doing "cmd, cd" over and over, so I experimented and found a way to open a cmd in a specific directory. Put the following into a batch file:
cd "C:/path/to/dir"cmd
Throw the batch into C:\WINDOWS\system32 and give it a name. Now you can do Win + R, name, and your cmd will launch, already in the proper directory.
Subscribe to:
Posts (Atom)