How does "PROGRA~1" path notation work?

21

8

Since my first Windows 98 (and even now on Win7), I could enter the first 6 letters (symbols) of a folder's name and add ~1 after it (when there was just one folder with those six letters in current directory), and it would work as the full name of it. And it appears that if there are more than one folder with the same six first symbols in its name, I can use FOLDER~2 and so on, and it will open the corresponding folder, as if I entered its full name. Like c:\progra~1 will open C:\Program Files and c:\progra~2 will open C:\Program Files (x86) on win7 64 bit.

How does this work?

user1306322

Posted 2013-01-07T16:09:58.097

Reputation: 4 237

Question was closed 2017-05-22T04:15:11.313

@LưuVĩnhPhúc you've linked to a newer question than this, so if one is closed as a duplicate, it should be the other way around. – user1306322 – 2017-05-22T04:06:05.083

@LưuVĩnhPhúc ok u win :p – user1306322 – 2017-05-22T04:15:33.047

1It doesn't happen to me. If I open C:\progra~1 the full folder name is also shown instead of the abbreviation. Besides: What is the intention of your question? What do you want to achieve? – speakr – 2013-01-07T16:12:54.400

@speakr: Same here. Just wanted to post that. – Der Hochstapler – 2013-01-07T16:13:08.300

Started to answer this based primarily on the actual question title, then realized I misread it...it appears you know how this works, your real question is more subtle. I can't duplicate this beahvior either, fwiw. – Shinrai – 2013-01-07T16:14:17.333

Okay, I decided to change the question, since I can't always reproduce this now :x Anyway, it hasn't been asked before, could be handy for someone else. – user1306322 – 2013-01-07T16:19:14.050

1

Note: Short file names can be disabled.

– Karan – 2013-01-07T23:22:34.243

Answers

11

Knowledge base entry

Basically on FAT systems all directory entries are still stored in a format compatible with the old 8.3 format; longer names are stored in a series of hidden entries. The short name is there for compatibility.

pjc50

Posted 2013-01-07T16:09:58.097

Reputation: 5 786

Link doesn't work. Do you remember what it was? – Thrash Abaddon – 2018-03-26T09:52:24.850

It appears Microsoft have deleted that knowledge base entry, which is pretty bad of them! – pjc50 – 2018-03-26T11:21:05.617

6

These are 8.3 filenames, and date back to the days of MS-DOS, which did not support longer filenames.

Windows 95 and VFAT introduced the ~N tilde notation as a backward compatibility mechanism, to give each long file name a unique 8.3 short file name, too.

Pi Delport

Posted 2013-01-07T16:09:58.097

Reputation: 368