Why do you "cd" to a particular address in another drive letter, and you don't move immediately and you have that position on that drive?

Asked 2 years ago, Updated 2 years ago, 48 views

at C:\WINDOWS\system32>A

cd D:\temp\blabla

You don't just go to that blah blah folder right away, you just stay where you are.

If you put d: in this state and go to the D drive, it doesn't start at d:\, but only then in the D:\temp\blabla folder.

I don't quite understand this logic.

Why do they reserve that particular location that they put in without moving it right away?

unix

2022-09-20 19:29

1 Answers

Linux/Unix's cd and DOS's cd have the same name but do not behave the same.

What you asked is a question about cd of DOS.

The cd in DOS stores the current directory separately for each drive. If you want to print the current directory saved for each drive, you can run cd drive name:. For example, cdc: or cdd:. If you do cd without the drive name, the current directory of the current drive will be printed.

Also, when you want to be in C:\WINDOWS\system32> and then move directly to D:\temp\blabla, use the following two methods a lot.

d: && cd d:\temp\blabla

Or

cd /d d:\temp\blabla


2022-09-20 19:29

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.