Can't change current working directory to external drive in Windows

87,651

Solution 1

When you type cd e:\ you are changing the current working directory (CWD) for drive E:, but you are not currently on that drive. To go to drive E:, just type: E: and hit enter.

You can change the CWD of any drive without being on it, as you can change drives at anytime by just typing the drive letter followed by colon (:).

This is expected behavior since the very first versions of MS-DOS (and probably all other DOS OS), as for Windows as it's successor.

Solution 2

To change to a different drive and simultaneously specify a directory in that drive you can use the "/d"-parameter like this: cd /d E:\ This will take you to the root directory of E:

Share:
87,651

Related videos on Youtube

Tom
Author by

Tom

Updated on September 18, 2022

Comments

  • Tom
    Tom almost 2 years

    Possible Duplicate:
    Using cd Command in Windows Command Line, Can’t Navigate to D:\
    CMD cd to other drives except C:\ not working

    I'm trying to run a program located on an external USB disk using the Windows command prompt. I'm running Windows 7 64-bit (running in VMWare Workstation 8.0.)

    Here's what happens:

    1. I plug in the USB disk and it appears as drive letter 'E' in My Computer.
    2. I launch cmd from the start menu.
    3. I notice the prompt displays C:\Users\Tom>
    4. I type cd E:\
    5. I notice the prompt displays C:\Users\Tom> (cd also yields C:\Users\Tom>)

    I can explore the drive using explorer.exe just fine, and it is connected according to VMWare Workstation. What am I doing wrong?

  • 0xAF
    0xAF about 12 years
    Yes, that's the whole point of changing the CWD of different drive ;)