Thursday, 8 August 2019

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




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?



Answer



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.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...