Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
8.3 filename
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Directory table== {{Main|FAT directory table}} A directory table is a special type of file that represents a directory. Each file or directory stored within it is represented by a 32-byte entry in the table. Each entry records the name, extension, attributes ([[archive bit|archive]], directory, hidden, read-only, system and volume), the date and time of creation, the address of the first cluster of the file/directory's data and finally the size of the file/directory. Legal characters for DOS filenames include the following: * Uppercase letters {{code|A}}β{{code|Z}} * Numbers {{code|0}}β{{code|9}} * Space (though trailing spaces in either the base name or the extension are considered to be padding and not a part of the filename, also filenames with spaces in them must be enclosed in quotes to be used on a DOS command line, and if the DOS command is built programmatically, the filename must be enclosed in double double-quotes ({{code|""}}...{{code|""}}) when viewed as a variable within the program building the DOS command.) * {{code|!}}, {{code|#}}, {{code|$}}, {{code|%}}, {{code|&}}, {{code|'}}, {{code|(}}, {{code|)}}, {{code|-}}, {{code|@}}, {{code|^}}, {{code|_}}, {{code|`}}, {{code|{}}, {{code|} }}, {{code|~}} * Values 128β255 (though if [[National Language Support|NLS]] services are active in DOS, some characters interpreted as lowercase are invalid and unavailable) This excludes the following [[ASCII]] characters: * {{code|"}}, {{code|*}}, {{code|+}}, {{code|,}}, {{code|/}}, {{code|:}}, {{code|;}}, {{code|<}}, <code>=</code>, {{code|>}}, {{code|?}}, {{code|\}}, {{code|[}}, {{code|]}}, <code>|</code><ref name=AB>{{cite web |last=Andries Brouwer |author-link=Andries Brouwer |title=Directory Entry |website=The FAT filesystem |date=2007-12-26 |url=http://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html#ss1.4 |access-date=2013-07-30}}</ref><br/>MS-DOS has no shell [[escape character#Bourne shell|escape character]] * {{code|.}} ({{unichar|002e|full stop}}) within name and extension fields, except in {{code|.}} and {{code|..}} entries (see below) * Lowercase letters {{code|a}}β{{code|z}}, stored as {{code|A}}β{{code|Z}} on FAT12/FAT16 * Control characters 0β31 * Value 127 ([[delete character|DEL]]) {{Dubious|date=March 2009}} The DOS filenames are in the [[code page|OEM character set]]. Code 0xE5 as the first byte (see below) causes issues when [[extended ASCII|extra-ASCII characters]] are used. Directory entries, both in the Root Directory Region and in subdirectories, are of the following format: {{Further|FAT directory entry}} {| class="wikitable" !width="5%"|Byte Offset !width="5%"|Length !width="40%"|Description |- |align="right"|0x00 |align="right"|8 |DOS filename (padded with spaces) The first byte can have the following special values: {| class="wikitable" |0x00 |Entry is available and no subsequent entry is in use |- |0x05 |Initial character is actually 0xE5 |- |0x2E |''Dot entry'': either {{code|.}} or {{code|..}} |- |0xE5 |Entry has been previously erased. File [[undelete]] utilities must replace this character with a regular character as part of the undeletion process. |} |- |align="right"|0x08 |align="right"|3 |DOS file extension (padded with spaces, may be empty) |- |align="right"|0x0b |align="right"|1 |File Attributes The first byte can have the following special values: {| class="wikitable" !width="5%"|Bit !width="5%"|Mask !width="40%"|Description |- |0 |0x01 |Read Only |- |1 |0x02 |Hidden |- |2 |0x04 |System |- |3 |0x08 |Volume Label |- |4 |0x10 |Subdirectory |- |5 |0x20 |[[Archive bit|Archive]] |- |6 |0x40 |Device (internal use only, never found on disk) |- |7 |0x80 |Unused |} An attribute value of 0x0F is used to designate a long filename entry. |- |align="right"|0x0c |align="right"|1 |Reserved; two bits are used by NT and later versions to encode case information |- |align="right"|0x0d |align="right"|1 |Create time, fine resolution: 10 [[millisecond|ms]] units, values from 0 to 199. |- |align="right"|0x0e |align="right"|2 |Create time. The hour, minute and second are encoded according to the following bitmap: {| class="wikitable" !width="5%"|Bits !width="40%"|Description |- |15β11 |Hours (0β23) |- |10β5 |Minutes (0β59) |- |4β0 |Seconds/2 (0β29) |} Note that the ''seconds'' is recorded only to a 2 [[second]] resolution. Finer resolution for file creation is found at offset 0x0d. |- |align="right"|0x10 |align="right"|2 |Create date. The year, month, and day are encoded according to the following bitmap: {| class="wikitable" !width="5%"|Bits !width="40%"|Description |- |15β9 |Year (0 = 1980, 127 = 2107) |- |8β5 |Month (1 = January, 12 = December) |- |4β0 |Day (1β31) |} |- |align="right"|0x12 |align="right"|2 |Last access date; see offset 0x10 for description. |- |align="right"|0x14 |align="right"|2 |EA-Index (used by [[OS/2]] and NT) in FAT12 and FAT16, High 2 bytes of first cluster number in FAT32 |- |align="right"|0x16 |align="right"|2 |Last modified time; see offset 0x0e for description. |- |align="right"|0x18 |align="right"|2 |Last modified date; see offset 0x10 for description. |- |align="right"|0x1a |align="right"|2 |First cluster in FAT12 and FAT16. Low 2 bytes of first cluster in FAT32. |- |align="right"|0x1c |align="right"|4 |File size |}
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
8.3 filename
(section)
Add topic