# "c:\Program Files\" and "c:\Progra~1"



## ThreeRight

i wondering why does CMD prompt write "c:\Progra~1" when dealing with "c:\Program Files\"  and how/why is it shortened. I did a small test on my computer and it seems that the computer can tell the difference between "c:\Program Files\" and "c:\Prograaeru feajkljl" when i type "start c:\Progra~1\(name of program)" in the command prompt


----------



## Cromewell

The cmd prompt should show the full name, assuming you are using win2k or later while command will use the 8 character name. If you are using an older version of windows, (or command for that matter) the 8 character name is for DOS compatability. The system keeps the full name and only displays the short name which is why "c:\Prograaeru feajkljl" doesn't work.


----------



## ThreeRight

why does "c:\Progra~2\" work for "c:\Prograaeru feajkljl\" and "c:\Progra~1\" work for "c:\Program Files\"? what does the numbers mean?


----------



## dragon2309

Dont quote me on this, im not 100%, but i think its because of what Cromewell said above.

command will only ever show an 8bit name, take "c:\Program Files\" for instance, will automatically be displayed as c:\Progra~1\ beacuse thats all it can fit in 8bits (8 characters)

The number at the end is a unique identifier, meaning the chances of the shortened word "Progra" being duplicated are high, so it puts a number after it... If there is a second instance of "Progra" it will increase the number by 1.

I'm guessing this "c:\Prograaeru feajkljl\" is a dir you created yourself (or a program created for you) when this is forced to display in 8bits, it too turns out as "Progra" but it can't use the same name as before because, well it just cant, so it looks around and sees that there is already a "1" taken, so it increments the number by 1 and assigns "c:\Progra~2\" to "c:\Prograaeru feajkljl\"

Make any sense?

dragon2309


----------



## ThreeRight

soo... the number is determined by the date that the folder was created?


----------

