This is fairly dangerous advice. If you have two files / directories with long names, say "directory_A" and "directory_B", they don't get the same short name, "direct~1", but they get "direct~1" and "direct~2" on a first-come, first-served base.
If, under Windows NT (SP3 and higher I believe), the number of long filenames gets larger than 100, NT ditches the serial assignment of short filenames due to performance reasons (always looking at all filenames to get the next number takes too long) and uses a hash of the long filename to create the short name and moves on if collisions were found. Thus, under NT, it's quite possible to see filenames such as "dir~DEAD" as the short name for any of the two long names.
Also, if prior to the installation of Windows on a harddisk already formatted with the FAT32 filesystem, there already exists a directory with the name "Programming" (or, as with the german installation of Windows, where the directory "Program Files" has been correctly translated into "Programme") without "Program Files" having been there before, "Program Files" will have the short name "Progra~2". I can also tell you that hardcoding "C:/Program Files" into your programs will only bring you aggravated international users, as the name "Program Files" is not universal over the various language versions of Windows.
In reply to Re: Re: Perl & Window's system stuff: Can they get along?
by Corion
in thread Perl & Window's system stuff: Can they get along?
by akm2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |