Solved Change Directory in Command Prompt

QuackPot

New member
Pro User
Local time
7:25 PM
Messages
396
Anyone know how to do this in command prompt?

I type "cd .." a few times to get to to C:\

Then when I type "cd e:\" I see E:\ below the command line but I'm still in C:\.


Can anyone help?

Edit: Nevermind, manage to get it working. Just had to type "E:" instead of using CD beforehand. So used to linux.
 

My Computer

Computer Manufacturer/Model Number
Desktop
OS
Windows 7 Professional x64
CPU
Intel i5-2500k @ 3.3Ghz
Motherboard
Gigabyte GA-Z77X-UD5H
Memory
4GB DDR3
Graphics Card(s)
Nvidia GTS250 1GB
Monitor(s) Displays
Sony SDM S95A
Screen Resolution
1280x1024
Hard Drives
1x 1TB, 2x 250GB HDDs
PSU
Corsair HX850W
Case
Cooler Master 690 II
Cooling
Thermalright True Spirit 140mm & 3x 120mm & 3x 140mm Fans
Keyboard
Logitech Media Keyboard
Mouse
Microsoft Intellimouse
Internet Speed
8MB
CD command is only meant to change directories, not drives. If you want to change to drive E: , just type E: at the prompt.
 

My Computer

Computer Manufacturer/Model Number
Too many to describe...
OS
Windows 7 x64 pro/ Windows 7 x86 Pro/ XP SP3 x86
Exactly as Bill told here above. Here a bit more information.

CD (change directory) can be used to change the current, active folder (directory as it was called long time ago ;)) of either the current drive or another drive. If you use CD command to change active folder in another drive than where you currently are, the change can be seen next time you change the active drive.

Some examples here in the screenshot:

CD_parameters_2.png

(Click to enlarge)

Kari
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
use the /D switch with CD to change the drive along with the path.
Code:
> cd /?
Displays the name of or changes the current directory.

CHDIR [/D] [drive:][path]
CHDIR [..]
CD [/D] [drive:][path]
CD [..]

  ..   Specifies that you want to change to the parent directory.

Type CD drive: to display the current directory in the specified drive.
Type CD without parameters to display the current drive and directory.

Use the /D switch to change current drive in addition to changing current
directory for a drive.

If Command Extensions are enabled CHDIR changes as follows:

The current directory string is converted to use the same case as
the on disk names.  So CD C:\TEMP would actually set the current
directory to C:\Temp if that is the case on disk.

CHDIR command does not treat spaces as delimiters, so it is possible to
CD into a subdirectory name that contains a space without surrounding
the name with quotes.  For example:

    cd \winnt\profiles\username\programs\start menu

is the same as:

    cd "\winnt\profiles\username\programs\start menu"

which is what you would have to type if extensions were disabled.

You can read about why this behavior exists here: http://blogs.msdn.com/b/oldnewthing/archive/2010/10/11/10073890.aspx

Alternatively you could update to PowerShell which is a lot more advance and newer.
 
Last edited:

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Alienware Aurora ALX R4
OS
Windows 10 Pro (x64)
CPU
Intel Core i7-3930K (3.2GHz - 4.5GHz)
Motherboard
Alienware Aurora-R4 x79
Memory
4x Samsung 4GB PC3-12800 DDR3 (16GB 1600MHz)
Graphics Card(s)
Nvidia Geforce GTX 690
Sound Card
SteelSeries Siberia Elite
Monitor(s) Displays
Dell UltraSharp U3011
Screen Resolution
2560x1600
Hard Drives
Samsung 850 Pro 256 GB, Seagate 1TB Desktop Hybrid HDD, 2x Western Digital 4TB Green HDD
PSU
875W Some Dell PSU <.<
Case
Alienware Aurora ALX
Cooling
Custom Liquid Cooling (EK CPU & GPU blocks) dual EK 480RAD
Keyboard
Logitech G710+ Mechanical
Mouse
Logitech G700s
Internet Speed
Verizon Fios (50 mbps average)
Other Info
Server: Intel NUC D54250WYK: i5-4250U, 16GB, 256 GB mSATA, Windows Server 2012 R2
Back
Top