This might be what you want:
cmd /K "cd C:\Windows\"
Note that in order to change drive letters, you need to use cd /d
. For example:
C:\Windows\System32\cmd.exe /K "cd /d H:\Python\"
More Related Contents:
- How do I run two commands in one line in Windows CMD?
- Batch command date and time in file name
- How do I get the application exit code from a Windows command line?
- Windows batch: echo without new line
- How do I kill the process currently using a port on localhost in Windows? [closed]
- Is there any sed like utility for cmd.exe? [closed]
- How to test if a file is a directory in a batch script?
- Escape percent in bat file
- How can I create an empty file at the command line in Windows?
- How to redirect Windows cmd stdout and stderr to a single file?
- How can two text files be read in parallel by a batch file?
- Capture output command CMD
- “rd” exits with errorlevel set to 0 on error when deletion fails, etc
- What is the Windows equivalent of the diff command?
- Why does only the first line of this Windows batch file execute but all three lines execute in a command shell?
- Curl not recognized as an internal or external command, operable program or batch file
- How to echo “2” (no quotes) to a file, from a batch script?
- Why is the FOR /f loop in this batch script evaluating a blank line?
- Create a new cmd.exe window from within another cmd.exe prompt
- How do I minimize the command prompt from my bat file
- Path prefixes \??\ and \\?\
- Windows command interpreter: how to obtain exit code of first piped command
- What would be the Windows batch equivalent for HTML’s input type=”password”?
- Windows console %DATE% Math
- Batch goto loses errorlevel
- I need to match or replace an asterisk * in a batch environmental variable using only native Windows commands. Is this possible?
- Escape percent signs in given variables
- Out of a git console: how do I execute a batch file and then return to git console?
- UTF-16 to UTF-8 conversion (for scripting in Windows)
- Do you know a similar program for wc (unix word count command) on Windows? [closed]