8 character representation of a long directory name within a command prompt

I have a directory named

c:\program files (x86)\Java60\jre

Open in new window


For directories longer than 8 characters,
In some contexts, Windows sometimes displays
these directories with something like the
following nomenclature

c:\progra~2

Open in new window


However, when I do a 'dir', or 'cd' on the command prompt, I can not see the 8 character representation of the directory name

How can I view the 8 character representation for a directory within a command prompt

Is there a certain command or context in which I can perform this?
Anthony LuciaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Seth SimmonsSr. Systems AdministratorCommented:
use dir /x for the 8.3 name
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Steve KnightIT ConsultancyCommented:
You can also use "command" instead of "cmd" and see just 8.3 names

dir /ad /x will just show dirs too.

You can also get short name as part of a loop through filenames with the for command if needed, depending upon what you are trying to do?

Steve
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.