how to change directory using Windows command line [closed]Change directory via cmd.exe doesn't workHow do I parse command line arguments in Bash?Is there an equivalent of 'which' on the Windows command line?How do I get the application exit code from a Windows command line?How can I pretty-print JSON in a shell script?How to pass command line arguments to a rake taskHow do I install pip on Windows?List all environment variables from command line?How do I run two commands in one line in Windows CMD?How to copy a folder from remote to local using scp?How to import an SQL file using the command line in MySQL?
Mathematica 12 has gotten worse at solving simple equations?
Finding diameter of a circle using two chords and angle between them
My mom's return ticket is 3 days after I-94 expires
Why are ambiguous grammars bad?
Should I explain the reasons for gaslighting?
What would the consequences be of a high number of solar systems being within close proximity to one another?
Convert GE Load Center to main breaker
How can I list the different hex characters between two files?
Oil draining out shortly after turbo hose detached/broke
Why is my power MOSFET heating up when on?
If absolute velocity does not exist, how can we say a rocket accelerates in empty space?
Forgot passport for Alaska cruise (Anchorage to Vancouver)
Why do the TIE Fighter pilot helmets have similar ridges as the rebels?
How to make a composition of functions prettier?
What is Gilligan's full Name?
Do they make "karaoke" versions of concertos for solo practice?
ASCII Meme Arrow Generator
What is the STRONGEST end-of-line knot to use if you want to use a steel-thimble at the end, so that you've got a steel-eyelet at the end of the line?
In Pandemic, why take the extra step of eradicating a disease after you've cured it?
How many sets of dice do I need for D&D?
Was self-modifying code possible using BASIC?
What do you call the action of "describing events as they happen" like sports anchors do?
What does the homotopy coherent nerve do to spaces of enriched functors?
When to use и or а as “and”?
how to change directory using Windows command line [closed]
Change directory via cmd.exe doesn't workHow do I parse command line arguments in Bash?Is there an equivalent of 'which' on the Windows command line?How do I get the application exit code from a Windows command line?How can I pretty-print JSON in a shell script?How to pass command line arguments to a rake taskHow do I install pip on Windows?List all environment variables from command line?How do I run two commands in one line in Windows CMD?How to copy a folder from remote to local using scp?How to import an SQL file using the command line in MySQL?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm using cmd.exe
(C:WINDOWSSystem32cmd.exe) and I have to change my current directory to "D:temp" i.e. temp folder in the D drive.
When I try to cd
nothing happens.
C:> cd D:temp
C:>
I don't know what else to do here. Even pressing tab
key does not give any hints. I have never got the reason to use cmd.exe until now when I have to. I mostly use Linux for development.
If this helps: I'm on a remote login to another computer and D:temp
in on the remote machine, but so is C:
where I have opened the terminal (cmd.exe).
windows command-line cmd command-prompt
closed as off-topic by Raymond Chen, Ansgar Wiechers, Danny Beckett, burzum, madth3 Jul 22 '13 at 3:19
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User." – Raymond Chen, Ansgar Wiechers, madth3
add a comment |
I'm using cmd.exe
(C:WINDOWSSystem32cmd.exe) and I have to change my current directory to "D:temp" i.e. temp folder in the D drive.
When I try to cd
nothing happens.
C:> cd D:temp
C:>
I don't know what else to do here. Even pressing tab
key does not give any hints. I have never got the reason to use cmd.exe until now when I have to. I mostly use Linux for development.
If this helps: I'm on a remote login to another computer and D:temp
in on the remote machine, but so is C:
where I have opened the terminal (cmd.exe).
windows command-line cmd command-prompt
closed as off-topic by Raymond Chen, Ansgar Wiechers, Danny Beckett, burzum, madth3 Jul 22 '13 at 3:19
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User." – Raymond Chen, Ansgar Wiechers, madth3
8
only addD:
orC:
not required cd..
– marlonpya
May 26 '17 at 19:17
19
Why is this closed as off-topic? CMD can be used in programming, for an instance related to ADB (Android debug bridge) and it can also be used to execute programs in other languages (e.g. C, Java, Python, etc). If the target is in a different drive, the command is used to open the appropriate drive. I would say it directly involves tools used in programming, as it can be used for so many different programming-related things includin, but not limited to, ADB, launching programs, etc
– Zoe
Jun 7 '17 at 13:30
2
This applies to cmd command files :) - shouldn't be off topic
– chris31389
Jun 6 '18 at 7:27
1
Again a great example of a good question, but some programmers being way too strict or having something up their a*, which results in that a proper question gets closed as off topic or for some other reason. Happy to see the large number of upvotes.
– JohnAndrews
Jan 31 at 11:58
add a comment |
I'm using cmd.exe
(C:WINDOWSSystem32cmd.exe) and I have to change my current directory to "D:temp" i.e. temp folder in the D drive.
When I try to cd
nothing happens.
C:> cd D:temp
C:>
I don't know what else to do here. Even pressing tab
key does not give any hints. I have never got the reason to use cmd.exe until now when I have to. I mostly use Linux for development.
If this helps: I'm on a remote login to another computer and D:temp
in on the remote machine, but so is C:
where I have opened the terminal (cmd.exe).
windows command-line cmd command-prompt
I'm using cmd.exe
(C:WINDOWSSystem32cmd.exe) and I have to change my current directory to "D:temp" i.e. temp folder in the D drive.
When I try to cd
nothing happens.
C:> cd D:temp
C:>
I don't know what else to do here. Even pressing tab
key does not give any hints. I have never got the reason to use cmd.exe until now when I have to. I mostly use Linux for development.
If this helps: I'm on a remote login to another computer and D:temp
in on the remote machine, but so is C:
where I have opened the terminal (cmd.exe).
windows command-line cmd command-prompt
windows command-line cmd command-prompt
edited Jul 8 '17 at 21:17
Mofi
29.9k83983
29.9k83983
asked Jul 19 '13 at 19:25
A. K.A. K.
11.7k133768
11.7k133768
closed as off-topic by Raymond Chen, Ansgar Wiechers, Danny Beckett, burzum, madth3 Jul 22 '13 at 3:19
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User." – Raymond Chen, Ansgar Wiechers, madth3
closed as off-topic by Raymond Chen, Ansgar Wiechers, Danny Beckett, burzum, madth3 Jul 22 '13 at 3:19
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User." – Raymond Chen, Ansgar Wiechers, madth3
8
only addD:
orC:
not required cd..
– marlonpya
May 26 '17 at 19:17
19
Why is this closed as off-topic? CMD can be used in programming, for an instance related to ADB (Android debug bridge) and it can also be used to execute programs in other languages (e.g. C, Java, Python, etc). If the target is in a different drive, the command is used to open the appropriate drive. I would say it directly involves tools used in programming, as it can be used for so many different programming-related things includin, but not limited to, ADB, launching programs, etc
– Zoe
Jun 7 '17 at 13:30
2
This applies to cmd command files :) - shouldn't be off topic
– chris31389
Jun 6 '18 at 7:27
1
Again a great example of a good question, but some programmers being way too strict or having something up their a*, which results in that a proper question gets closed as off topic or for some other reason. Happy to see the large number of upvotes.
– JohnAndrews
Jan 31 at 11:58
add a comment |
8
only addD:
orC:
not required cd..
– marlonpya
May 26 '17 at 19:17
19
Why is this closed as off-topic? CMD can be used in programming, for an instance related to ADB (Android debug bridge) and it can also be used to execute programs in other languages (e.g. C, Java, Python, etc). If the target is in a different drive, the command is used to open the appropriate drive. I would say it directly involves tools used in programming, as it can be used for so many different programming-related things includin, but not limited to, ADB, launching programs, etc
– Zoe
Jun 7 '17 at 13:30
2
This applies to cmd command files :) - shouldn't be off topic
– chris31389
Jun 6 '18 at 7:27
1
Again a great example of a good question, but some programmers being way too strict or having something up their a*, which results in that a proper question gets closed as off topic or for some other reason. Happy to see the large number of upvotes.
– JohnAndrews
Jan 31 at 11:58
8
8
only add
D:
or C:
not required cd..– marlonpya
May 26 '17 at 19:17
only add
D:
or C:
not required cd..– marlonpya
May 26 '17 at 19:17
19
19
Why is this closed as off-topic? CMD can be used in programming, for an instance related to ADB (Android debug bridge) and it can also be used to execute programs in other languages (e.g. C, Java, Python, etc). If the target is in a different drive, the command is used to open the appropriate drive. I would say it directly involves tools used in programming, as it can be used for so many different programming-related things includin, but not limited to, ADB, launching programs, etc
– Zoe
Jun 7 '17 at 13:30
Why is this closed as off-topic? CMD can be used in programming, for an instance related to ADB (Android debug bridge) and it can also be used to execute programs in other languages (e.g. C, Java, Python, etc). If the target is in a different drive, the command is used to open the appropriate drive. I would say it directly involves tools used in programming, as it can be used for so many different programming-related things includin, but not limited to, ADB, launching programs, etc
– Zoe
Jun 7 '17 at 13:30
2
2
This applies to cmd command files :) - shouldn't be off topic
– chris31389
Jun 6 '18 at 7:27
This applies to cmd command files :) - shouldn't be off topic
– chris31389
Jun 6 '18 at 7:27
1
1
Again a great example of a good question, but some programmers being way too strict or having something up their a*, which results in that a proper question gets closed as off topic or for some other reason. Happy to see the large number of upvotes.
– JohnAndrews
Jan 31 at 11:58
Again a great example of a good question, but some programmers being way too strict or having something up their a*, which results in that a proper question gets closed as off topic or for some other reason. Happy to see the large number of upvotes.
– JohnAndrews
Jan 31 at 11:58
add a comment |
3 Answers
3
active
oldest
votes
The "cd" command changes the directory, but not what drive you are working with. So when you go "cd d:temp", you are changing the D drive's directory to temp, but staying in the C drive.
Execute these two commands:
D:
cd temp
That will get you the results you want.
5
this does not work if cd command is executed for environment variable, for examplecd %temp%
. In case if current drive differs from temp folder drivecd %temp%
do nothing.cd /d %temp%
should be used as @Stephan said
– oleksa
Nov 17 '15 at 11:26
2
i.e First change the Drive then change the Folder or directory, hope helps someone.
– stom
Aug 27 '16 at 15:24
I ran second first and when I used Drive name it automatically went to directory so cd temp, D: also work
– abdul qayyum
Feb 9 '18 at 11:30
add a comment |
Another alternative is pushd
, which will automatically switch drives as needed. It also allows you to return to the previous directory via popd
:
C:Temp>pushd D:somefolder
D:somefolder>popd
C:Temp>_
2
Perfect answer. No worries on source folder.
– Andi AR
Oct 20 '16 at 10:00
Way easier than going up and down folder levels!
– Matt M.
Apr 7 '18 at 16:50
add a comment |
cd
has a parameter /d
, which will change drive and path with one command:
cd /d d:temp
( see cd /?
)
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
The "cd" command changes the directory, but not what drive you are working with. So when you go "cd d:temp", you are changing the D drive's directory to temp, but staying in the C drive.
Execute these two commands:
D:
cd temp
That will get you the results you want.
5
this does not work if cd command is executed for environment variable, for examplecd %temp%
. In case if current drive differs from temp folder drivecd %temp%
do nothing.cd /d %temp%
should be used as @Stephan said
– oleksa
Nov 17 '15 at 11:26
2
i.e First change the Drive then change the Folder or directory, hope helps someone.
– stom
Aug 27 '16 at 15:24
I ran second first and when I used Drive name it automatically went to directory so cd temp, D: also work
– abdul qayyum
Feb 9 '18 at 11:30
add a comment |
The "cd" command changes the directory, but not what drive you are working with. So when you go "cd d:temp", you are changing the D drive's directory to temp, but staying in the C drive.
Execute these two commands:
D:
cd temp
That will get you the results you want.
5
this does not work if cd command is executed for environment variable, for examplecd %temp%
. In case if current drive differs from temp folder drivecd %temp%
do nothing.cd /d %temp%
should be used as @Stephan said
– oleksa
Nov 17 '15 at 11:26
2
i.e First change the Drive then change the Folder or directory, hope helps someone.
– stom
Aug 27 '16 at 15:24
I ran second first and when I used Drive name it automatically went to directory so cd temp, D: also work
– abdul qayyum
Feb 9 '18 at 11:30
add a comment |
The "cd" command changes the directory, but not what drive you are working with. So when you go "cd d:temp", you are changing the D drive's directory to temp, but staying in the C drive.
Execute these two commands:
D:
cd temp
That will get you the results you want.
The "cd" command changes the directory, but not what drive you are working with. So when you go "cd d:temp", you are changing the D drive's directory to temp, but staying in the C drive.
Execute these two commands:
D:
cd temp
That will get you the results you want.
answered Jul 19 '13 at 19:27
Mark NenadovMark Nenadov
3,73721826
3,73721826
5
this does not work if cd command is executed for environment variable, for examplecd %temp%
. In case if current drive differs from temp folder drivecd %temp%
do nothing.cd /d %temp%
should be used as @Stephan said
– oleksa
Nov 17 '15 at 11:26
2
i.e First change the Drive then change the Folder or directory, hope helps someone.
– stom
Aug 27 '16 at 15:24
I ran second first and when I used Drive name it automatically went to directory so cd temp, D: also work
– abdul qayyum
Feb 9 '18 at 11:30
add a comment |
5
this does not work if cd command is executed for environment variable, for examplecd %temp%
. In case if current drive differs from temp folder drivecd %temp%
do nothing.cd /d %temp%
should be used as @Stephan said
– oleksa
Nov 17 '15 at 11:26
2
i.e First change the Drive then change the Folder or directory, hope helps someone.
– stom
Aug 27 '16 at 15:24
I ran second first and when I used Drive name it automatically went to directory so cd temp, D: also work
– abdul qayyum
Feb 9 '18 at 11:30
5
5
this does not work if cd command is executed for environment variable, for example
cd %temp%
. In case if current drive differs from temp folder drive cd %temp%
do nothing. cd /d %temp%
should be used as @Stephan said– oleksa
Nov 17 '15 at 11:26
this does not work if cd command is executed for environment variable, for example
cd %temp%
. In case if current drive differs from temp folder drive cd %temp%
do nothing. cd /d %temp%
should be used as @Stephan said– oleksa
Nov 17 '15 at 11:26
2
2
i.e First change the Drive then change the Folder or directory, hope helps someone.
– stom
Aug 27 '16 at 15:24
i.e First change the Drive then change the Folder or directory, hope helps someone.
– stom
Aug 27 '16 at 15:24
I ran second first and when I used Drive name it automatically went to directory so cd temp, D: also work
– abdul qayyum
Feb 9 '18 at 11:30
I ran second first and when I used Drive name it automatically went to directory so cd temp, D: also work
– abdul qayyum
Feb 9 '18 at 11:30
add a comment |
Another alternative is pushd
, which will automatically switch drives as needed. It also allows you to return to the previous directory via popd
:
C:Temp>pushd D:somefolder
D:somefolder>popd
C:Temp>_
2
Perfect answer. No worries on source folder.
– Andi AR
Oct 20 '16 at 10:00
Way easier than going up and down folder levels!
– Matt M.
Apr 7 '18 at 16:50
add a comment |
Another alternative is pushd
, which will automatically switch drives as needed. It also allows you to return to the previous directory via popd
:
C:Temp>pushd D:somefolder
D:somefolder>popd
C:Temp>_
2
Perfect answer. No worries on source folder.
– Andi AR
Oct 20 '16 at 10:00
Way easier than going up and down folder levels!
– Matt M.
Apr 7 '18 at 16:50
add a comment |
Another alternative is pushd
, which will automatically switch drives as needed. It also allows you to return to the previous directory via popd
:
C:Temp>pushd D:somefolder
D:somefolder>popd
C:Temp>_
Another alternative is pushd
, which will automatically switch drives as needed. It also allows you to return to the previous directory via popd
:
C:Temp>pushd D:somefolder
D:somefolder>popd
C:Temp>_
answered Jul 19 '13 at 20:18
Ansgar WiechersAnsgar Wiechers
149k14137196
149k14137196
2
Perfect answer. No worries on source folder.
– Andi AR
Oct 20 '16 at 10:00
Way easier than going up and down folder levels!
– Matt M.
Apr 7 '18 at 16:50
add a comment |
2
Perfect answer. No worries on source folder.
– Andi AR
Oct 20 '16 at 10:00
Way easier than going up and down folder levels!
– Matt M.
Apr 7 '18 at 16:50
2
2
Perfect answer. No worries on source folder.
– Andi AR
Oct 20 '16 at 10:00
Perfect answer. No worries on source folder.
– Andi AR
Oct 20 '16 at 10:00
Way easier than going up and down folder levels!
– Matt M.
Apr 7 '18 at 16:50
Way easier than going up and down folder levels!
– Matt M.
Apr 7 '18 at 16:50
add a comment |
cd
has a parameter /d
, which will change drive and path with one command:
cd /d d:temp
( see cd /?
)
add a comment |
cd
has a parameter /d
, which will change drive and path with one command:
cd /d d:temp
( see cd /?
)
add a comment |
cd
has a parameter /d
, which will change drive and path with one command:
cd /d d:temp
( see cd /?
)
cd
has a parameter /d
, which will change drive and path with one command:
cd /d d:temp
( see cd /?
)
answered Jul 19 '13 at 20:12
StephanStephan
37.3k43458
37.3k43458
add a comment |
add a comment |
8
only add
D:
orC:
not required cd..– marlonpya
May 26 '17 at 19:17
19
Why is this closed as off-topic? CMD can be used in programming, for an instance related to ADB (Android debug bridge) and it can also be used to execute programs in other languages (e.g. C, Java, Python, etc). If the target is in a different drive, the command is used to open the appropriate drive. I would say it directly involves tools used in programming, as it can be used for so many different programming-related things includin, but not limited to, ADB, launching programs, etc
– Zoe
Jun 7 '17 at 13:30
2
This applies to cmd command files :) - shouldn't be off topic
– chris31389
Jun 6 '18 at 7:27
1
Again a great example of a good question, but some programmers being way too strict or having something up their a*, which results in that a proper question gets closed as off topic or for some other reason. Happy to see the large number of upvotes.
– JohnAndrews
Jan 31 at 11:58