Need to navigate to a folder in command prompt [closed]
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you ca开发者_运维问答n leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this questionMy command prompt starts in C:\Users\ (Name) and I need it to be in a different folder, how can I do this using the command prompt itself?
Navigate to the folder in Windows Explorer, highlight the complete folder path in the top pane and type "cmd" - voila!
I prefer to use
pushd d:\windows\movie
because it requires no switches yet the working directory will change to the correct drive and path in one step.
Added plus:
- also works with UNC paths if an unused drive letter is available for automatic drive mapping,
- easy to go back to the previous working directory: just enter
popd
.
In MS-DOS COMMAND.COM
shell, you have to use:
d:
cd \windows\movie
If by chance you actually meant "Windows command prompt" (which is not MS-DOS and not DOS at all), then you can use cd /d d:\windows\movie
.
Just use the change directory (cd) command.
cd d:\windows\movie
To access another drive, type the drive's letter, followed by ":".
D:
Then enter:
cd d:\windows\movie
When I open a "DOS" command prompt, I use a batch file which sets all of the options I need and adds my old-time dos utilities to the path too.
@set path=%path%;c:\utils
@doskey cd=cd/d $*
@cd \wip
@cmd.exe
The doskey line sets the CD command so that it will do both drive and folder simultaneously. If this doesn't work, it is possibly because of the version of windows that you're running.
精彩评论