Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to use shortened path names for an application that I am using. For example I need C:\PROGRA~1\ as opposed to C:\Program Files. The program can't handle spaces and won't accept quoted paths e.g. "C:\Program Files".

If it helps, I am using Windows 7. I can get access to any version since XP if necessary.

share|improve this question

2 Answers

up vote 8 down vote accepted

Start, and type cmd in the run box. Start cmd, and use cd to get to the folder you are interested in:

cd \

Then

dir /x

C:\>dir /x

13/10/2011  09:14 AM    <DIR>          DOCUME~1     Documents and Settings
13/10/2011  09:05 AM    <DIR>          PROGRA~1     Program Files
share|improve this answer

The "short name" is really the old DOS 8.3 naming convention, so all the directories will be the first 6 letters followed by ~1 assuming there is only one name that matches, for example:

C:\ABCDEF~1 - C:\ABCDEFG I AM DIRECTORY
C:\BCDEFG~1 - C:\BCDEFGHIJKL M Another Directory

here is the only exception

C:\ABCDEF~1 - C:\ABCDEFG I AM DIRECTORY
C:\ABCDEF~2 - C:\ABCDEFGHI Directory as well

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.