[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:

how short file names work.

Does anyone know how long file names are converted into short file names.  I need to know.  I was looking at a directory structures and it looks like it takes the first 6 characters but the final characters seem to be unsequences.  I have created a cd of mp3 that I have backed up here is what the songs are and their equivalent 8 letter file names.

ACDC-Y~6 MP3     2,944,493  03-09-98 12:09p AC DC - You Shook Me All Night Long.
mp3
ACEOF~18 MP3     4,260,418  10-01-99  4:46p Ace of Base - Cruel Summer.mp3
APOTH~32 MP3     2,941,464  10-01-99  4:46p Apotheosis - O Fortuna.mp3
BAREN~42 MP3     3,304,952  10-01-99  4:47p Barenaked Ladies - Its All Been Done
.mp3
BAREN~54 MP3     2,701,130  10-01-99  4:47p Barenaked Ladies - One Week.mp3
BIFNA~64 MP3     4,161,326  07-30-98  3:05p Bif Naked - Spaceman.mp3
BILLI~78 MP3     4,350,272  10-01-99  4:47p Billie Myers - Kiss The Rain.mp3
BRYAN~92 MP3     4,383,402  10-01-99  4:47p Bryan Adams - Cuts Like A Knife.mp3
BRYA~108 MP3     6,306,537  10-01-99  4:48p Bryan Adams - Everything I Do I Do I
t For You.mp3
DANG~128 MP3     3,744,900  02-22-99 10:16p dangerous creatures.mp3
DANZ~142 MP3     3,273,584  10-01-99  4:48p Danzig - Mother.mp3
DRUN~152 MP3     5,040,250  10-01-99  4:48p Drunk Daddy - Purple Haze.mp3
FIFT~168 MP3     1,490,570  04-17-98 12:08a Fifth Element - Diva Dance.mp3

as you can see it does look a bit random.
0
isilver
Asked:
isilver
1 Solution
 
Patricia Siu-Lai HoCommented:
isilver,

      For every long file name, an alias entry is generated automatically that complies with the 8.3 file name rules for backward compatibility.

      Automatically generated aliases are composed of the first six characters of the file name plus ~n (where n is a number) and the first three characters after the last period.

      So the file name ThisIsALong.File.Name is associated with the automatically generated alias THISIS~1.NAM. If the alias name already exists, the algorithm will generate a unique value for n.

      Thus, in better management of the file names, use different alphabets starting with the initial 5 characters of a long file name will help.

e.g.  Oct Status Report    ->        OCTSTA~1.TXT
      Nov Status Report    ->        NOVSTA~1.TXT
      Dec Status Report    ->        DECSTA~1.TXT

    BRYAN~92 MP3     Bryan Adams - Cuts Like A Knife.mp3
    BRYA~108 MP3     Bryan Adams - Everything I Do I Do I

    It is better to use long names as:-

     Cuts Like A Knife.mp3 - Bryan Adams    CLAKF~1.MP3    
     Everything I Do I Do I - Bryan Adams   EIDID~1.MP3

     But CLAKF~1.MP3, EIDID~1.MP3 may not be exactly as alias is automatically generated through you system by its algorithm.

Note
=========
Neither the user nor an application can control the name created by the automatic alias process.

For the file name to comply with the 8.3 file name rules, it must use only the valid characters for an alias and it must be all uppercase. Valid characters for 8.3 file names (and aliases) can be any combination of letters and numbers, a space (ASCII 20H), ASCII characters greater than 127, and the following special characters:

$ % ' - _ @  ~ ` ! ( ) ^ # &

The following additional characters are valid in long file names, but are not valid in alias names or 8.3 file names:

+ , ; = [ ]

The following rules also apply for Windows 98 file systems:

Maximum file name component length is 255 characters, including NULL.

Maximum path length is 260 characters, including NULL (compared to 80 characters for a short name).

The OEM character set used by the installable file system (IFS) is determined by the registry and the contents of the file Unicode.bin.
The long file name directory entries use the Unicode character set to store the names.
 
The file name and the alias are the same if the file name meets 8.3 file name rules (that is, if it contains only valid characters for an alias and it is all uppercase).

This means that a file name using only valid characters for an alias and following the 8.3 file name format is still not the same as the alias name if it contains lowercase characters.

However, in this case the alias is the uppercase version of the file name.
For example, if the long file name is Examples.txt, its alias is EXAMPLES.TXT. The case is preserved in the long file name.
(Note, though, that path-based APIs in the Windows 98 file system are not case-sensitive. So a search of the form "EXAMPLES.TXT" or "Examples.txt" will find the same files.)

Tip

To see the alias for a file, right-click the file in any shell program such as Windows Explorer, and then select Properties from the context menu. The value for MS-DOS Name in the General Properties dialog box shows the alias assigned to this file. Also, the dir command at the command prompt shows the long file name.

--------
Hope this can be in assistance.      pslh
0
 
isilverAuthor Commented:
It's acceptable.  With a issue like this it's probably the best answer available.  I had found a work around for my programming problem anyways.  thanxs.
0
 
MoondancerCommented:
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed.  Also a question is posted there specific to these changes that apply to the experts here.  Also, I am including the link to our All Topics, since many new ones have recently been added.

http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
http://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thank you,
Moondancer
Moderator @ Experts Exchange
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now