Why am I getting invalid directory from Windows command line?

I’m not gonna use the actual file names but im trying to get to

C:\ABCD\P_9

From C: I’ve tried cd ABCD\P-9

I get invalid directory.

Next I tried cd ABCD. This got me to:

C:\ABCD

I did a dir and saw my P_9 listed

So from C:\ABCD> cd P_9

invalid directory.

FWIW P_9 has <DIR> between time and directory name.

This is WINXP SP 3

You may find this helpful:

http://www.tomshardware.com/forum/248039-44-rename-invalid-directory

If you type “cd P” and then hit tab does it auto-complete the directory in a usable way?

No

I was able to sort of replicate this in Windows 7 by creating a directory that had a unicode character that wouldn’t display in the command line. I was able to fix it with:

move P_9* P9

ETA: This assumes you don’t have anything named like P_9a, p_92, etc.

I tried getting to it from another computer that has the same directory/subdirectory and I can get to it fine. I can also get to it through Windows Explorer. Just not through command line. Weird.

If you can get to it from explorer, you might want to try renaming it to something else in explorer, then name it back to what you think it should be.

p_9 means file name p, version 9

Thats one trouble with having so many fancy features (A gui that understands version numbers) and still using a CLI

This really helped! I was astonished by how little I cared about renaming directories from the command line after browsing prom dresses for a few minutes.

On a slightly more seriously helpful note, I have sometimes found that Unicode characters in a path screw with the command line because it can’t interpret them and displays a ? instead. Have you tried enclosing your path name with quotes? Something like (from C:) cd “ABCD\P_9”.

On Win8, I’m able to create a directory with a Unicode character (I chose something from the Arabic script, which makes typing really difficult because it switches direction halfway through the name) and change directory to it via the command line by typing p+tab to autocomplete. However, the character still displays as a ?.