A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » General XP issues or comments
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Filename Convention



 
 
Thread Tools Display Modes
  #1  
Old February 21st 06, 04:29 PM posted to microsoft.public.windowsxp.general
external usenet poster
 
Posts: n/a
Default Filename Convention

Hi,
Is there a description (ISO-Norm or similar) which describe the
filename convention for filenames in WinXP ? Which special characters
(.,:;-&% ...) are allowed, which not ?

Thanks for tips

Hans from Switzerland


Ads
  #2  
Old February 21st 06, 07:33 PM posted to microsoft.public.windowsxp.general
external usenet poster
 
Posts: n/a
Default Filename Convention

MS has screwed up the link that I had for this, so here's the whole thing...

File Names in Windows XP Professional
Link is no longer good.
http://www.microsoft.com/resources/d...c_fil_rbrx.asp

File names in Windows XP Professional can be up to 255 characters and can
contain spaces, multiple periods, and special characters that are not
allowed in MS-DOS file names. Windows XP Professional makes it possible for
other operating systems to access files that have long names by generating
an MS-DOS-readable (8.3) name for each file. These MS-DOS-readable names
also enable MS-DOS-based and Windows 3.x–based applications to recognize and
load files that have long file names. When a program saves a file on a
computer running Windows XP Professional, both the 8.3 file name and long
file name are retained.

Note
• The 8.3 format means that files can have between 1 and 8 characters in the
file name. The name must start with a letter or a number and can contain
any characters except the following:

. " / \ [ ] : ; | = , * ? (space)

• An 8.3 file name typically has a file name extension that is from one to
three characters long and has the same character restrictions. A period
separates the file name from the file name extension.

• Several special file names are reserved by the system and cannot be used
for files or folders:

CON, AUX, COM1, COM2, COM3, COM4, LPT1, LPT2, LPT3, PRN, NUL

To see both the long and short file names for each file in the folder, at
the command line, type:

dir /x

Long File Names at the Command Prompt
At the command prompt, if you type the long name of a file or folder that
contains spaces, you must enclose the name in quotation marks. For example,
if you have a program called Dump Disk Files that you want to run from the
command prompt and you enter the name without quotation marks, it generates
the error message "Cannot find the program Dump or one of its components."

You must also use quotation marks around each referenced set of long file
names when a path typed at the command line includes spaces, as in the
following example:

move "c:\This month's reports\*.*" "c:\Last month's reports"

Caution
Use wildcard characters such as the asterisk (*) and question mark (?)
carefully in conjunction with the del and copy commands. Windows XP
Professional searches both long and short file names for matches to the
wildcard character combination you specify, which can cause additional files
to be deleted or copied. It is always a good idea to run the dir command
first on the specified files to make sure you are affecting only the files
you intend to use.

Generating Short File Names
In Windows XP Professional, both FAT and NTFS use the Unicode character set,
which contains several prohibited characters that MS-DOS cannot read, for
their names. To generate a short MS-DOS-readable file name, Windows XP
Professional deletes all of these characters from the long file name and
removes any spaces. Because an MS-DOS-readable file name can have only one
period, Windows XP Professional also removes extra periods from the file
name. If necessary, Windows XP Professional truncates the file name to six
characters and appends a tilde (~) and a number. For example, each
non-duplicate file name is appended with ~1. Duplicate file names end with
~2, then ~3, and so on. After the file names are truncated, the file name
extensions are truncated to three or fewer characters. Finally, when
displaying file names at the command line, Windows XP Professional
translates all characters in the file name and extension to uppercase.

Note
• You can permit extended characters by using the fsutil behavior set
command. You must restart the computer before this setting takes effect.
For more information about using the fsutil behavior set command, see
Windows XP Professional Help.

When five or more files exist that can result in duplicate short file names,
Windows XP Professional uses a slightly different method for creating short
file names. For the fifth and subsequent files, Windows XP Professional:

• Uses only the first two letters of the long file name.

• Generates the next four letters of the short file name by mathematically
manipulating the remaining letters of the long file name.

• Appends ~1 (or another number, if necessary, to avoid a duplicate file
name) to the result.

This method substantially improves performance when Windows XP Professional
must create short file names for a large number of files with similar long
file names. Windows XP Professional uses this method to create short names
for files on both FAT and NTFS volumes.

Table 13.15 shows the short file names for files created by six tests.

Table 13.15 Short File Names Created by Windows XP Professional — Example
One
Long File Name Short File Name
This is test 1.txt THISIS~1.TXT
This is test 2.txt THISIS~2.TXT
This is test 3.txt THISIS~3.TXT
This is test 4.txt THISIS~4.TXT
This is test 5.txt THA1CA~1.TXT
This is test 6.txt THA1CE~1.TXT

If the long file names in Table 13.5 are created in a different order, their
short file names are different, as shown in Table 13.16.

Table 13.16 Short File Names Created by Windows XP Professional — Example
Two
Long File Name Short File Name
This is test 2.txt THISIS~1.TXT
This is test 3.txt THISIS~2.TXT
This is test 1.txt THISIS~3.TXT
This is test 4.txt THISIS~4.TXT
This is test 5.txt THA1CA~1.TXT
This is test 6.txt THA1CE~1.TXT

When you delete a file, its short file name is also deleted. When you
create new files in the same folder, Windows XP Professional might re-use
short file names that have been deleted. For instance, in Example 1, if you
delete the file "This is test 1.txt," and then create a new file called
"This is test 7.txt," its short file name becomes THISIS~1.TXT.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In ,
Hans Schoeni hunted and pecked:
Hi,
Is there a description (ISO-Norm or similar) which describe the
filename convention for filenames in WinXP ? Which special characters
(.,:;-&% ...) are allowed, which not ?

Thanks for tips

Hans from Switzerland


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is a filename? Eric General XP issues or comments 10 January 28th 06 05:11 AM
Lag only when on-line Woldo Windows XP Help and Support 18 October 10th 05 11:28 PM
Apparent bug in XP SP2 filename search from Windows Explorer [email protected] Windows Service Pack 2 8 July 30th 05 12:57 AM
How to pass short filename in context menu? [email protected] General XP issues or comments 15 November 30th 04 12:36 AM
filename changes during save paul General XP issues or comments 16 November 10th 04 05:34 PM






All times are GMT +1. The time now is 11:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.