1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<!-- http://linux-ntfs.sourceforge.net/ntfs/concepts/filename_namespace.html -->
5
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6
<meta name="description" content="NTFS Documentation">
7
<link rel="stylesheet" type="text/css" href="../style/ntfsdoc.css">
8
<link rel="start" type="text/html" href="../index.html" title="NTFS Documentation">
9
<title>Filename Namespace - Concept - NTFS Documentation</title>
12
<table border="0" class="toolbar" summary="" cellspacing="0">
14
<td class="toolbar"><a accesskey="1" class="toolbar" href="../index.html">Home</a></td>
15
<td class="toolbar"> </td>
16
<td class="toolbar"><a accesskey="2" class="toolbar" href="../files/index.html">Files</a></td>
17
<td class="toolbar"> </td>
18
<td class="toolbar"><a accesskey="3" class="toolbar" href="../attributes/index.html">Attributes</a></td>
19
<td class="toolbar"> </td>
20
<td class="toolbar"><a accesskey="4" class="toolbar" href="../concepts/index.html">Concepts</a></td>
21
<td class="toolbar"> </td>
22
<td class="toolbar"><a accesskey="5" class="toolbar" href="../help/glossary.html">Glossary</a></td>
23
<td class="toolbar"> </td>
24
<td class="toolbar"><a accesskey="6" class="toolbar" href="../help/index.html">Help</a></td>
28
<h1>Concept - Filename Namespace</h1>
29
<a class="prevnext" accesskey="," href="file_reference.html">Previous</a>
30
<a class="prevnext" accesskey="." href="fixup.html">Next</a>
35
Old versions of the FAT filesystem had strict limits on filenames.
36
Many characters were forbidden, and the length was restricted to
37
11 characters (a small namespace). Newer versions of FAT allowed
38
more characters and longer filenames. NTFS has almost no restrictions.
42
Filenames are given a flag to show which namespace the name belongs
43
to. In order to support old applications, NTFS allocates a short
44
DOS-friendly name to any file with an DOS-incompatible name.
47
<h2>Possible Namespaces</h2>
52
This is the largest namespace. It is case sensitive and
53
allows all Unicode characters except for NULL (0) and
54
Forward Slash '/'. The maximum name length is 255 characters.
55
N.B. There are some characters, e.g. Colon ':', which are
56
valid in NTFS, but Windows will not allow you to use.
61
Win32 is a subset of the POSIX namespace and is case insensitive.
62
It uses all the Unicode characters, except:
63
'"' '*' '/' ':' '<' '>' '?' '\' '|'
64
N.B. Names cannot end with Dot '.', or Space ' '.
69
DOS is a subset of the Win32 namespace, allowing only 8 bit upper
70
case characters, greater than Space ' ', and excluding:
71
'"' '*' '+' ',' '/' ':' ';' '<' '=' '>' '?' '\'.
72
N.B. Names must match the following pattern:
73
1 to 8 characters, then '.', then 1 to 3 characters.
76
<dt>3: Win32 & DOS</dt>
78
This namespace means that both the Win32 and the DOS filenames are
79
identical and hence have been saved in this single filename record.
84
To convert a POSIX or Win32 filename to a DOS-friendly filename, follow these steps:
88
<li>Remove all Unicode characters</li>
89
<li>Remove all '.' but the last one if <em>it is not the first character</em></li>
90
<li>Uppercase all letters</li>
91
<li>Remove forbidden characters</li>
92
<li>Truncate everything before the potential '.' to 6 characters, and add the string "~1"</li>
93
<li>Truncate everything after the potential '.' to 3 characters</li>
94
<li>While the name already exists, increment the string "~1"</li>
98
N.B. Step 7 means that although the generated DOS name is unique,
99
it is impossible to deduce it from the Win32 name only.
103
<a class="contact" href="http://linux-ntfs.sourceforge.net/ntfs/concepts/filename_namespace.html">Online</a>
104
<!-- The two validators will only work if this page is visible on the web -->
105
<a class="contact" href="http://validator.w3.org/check/referer">Validate HTML</a>
106
<a class="contact" href="http://jigsaw.w3.org/css-validator/check/referer">Validate CSS</a>
107
<a class="contact" href="mailto:webmaster@flatcap.org">$Id: filename_namespace.html,v 1.1 2001/07/11 17:09:23 flatcap Exp $</a>