Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In a FAT entry, among other things, we have the extension field.

What values are commonly used in the extension fields for directories? Google fails me.

share|improve this question
Can't recall for sure, but i remember having to leave extention 'fields' empty for restoring directories from tape in an old DOS/Netware enviroment about 8 or 9 years ago... I actually wrote a batch file for it i came across when clearing an old drive of mine last summer, had to strip out _'s and .'s too :) – HaydnWVN Nov 22 '11 at 14:42
@HaydnWVN Empty as in what? "_" or " " or something else? – AndrejaKo Nov 22 '11 at 14:50
Empty as in nothing/blanks! Michaels answer is very concise and accurate below! :) – HaydnWVN Nov 22 '11 at 16:08
up vote 2 down vote accepted

As I recall (it's been a really long time), in FAT directory entries, the file (or directory) name is stored as simply 11 sequential characters. What was traditionally thought of as the file name was put in the first eight bytes, and the suffix in the last three, right-padding to the length of each part of the file name field. This was sometimes rendered by stripping the padding and inserting a period in the middle, AKA 8.3. Other tools (including plain old DIR without the /W flag) table-formatted the file names.

The description of File Control Blocks (FCBs) in Ralph Brown's interrupt list says the file name and suffix are "blank-padded", which apparently means space (\032) (thanks @afrazier for the link).

share|improve this answer
I know how that works. What I'm asking is what is actually in that last part of the name? Spaces? – AndrejaKo Nov 22 '11 at 14:54
See the edit. (filler) – Michael Kjörling Nov 22 '11 at 14:58
Interesting! Not what I was hoping, since I can't use space, but informative none the less. – AndrejaKo Nov 22 '11 at 15:01
You should be able to use spaces just fine (as long as the software you're using supports them), just not at the ends. ABC DEF.TXT is probably fine, but ABCDEF .TXT likely won't work. – Michael Kjörling Nov 22 '11 at 15:03
Also note that FCBs were deprecated fairly early on, but the constraints put on filenames by them (and the file system itself) remained. – Michael Kjörling Nov 22 '11 at 15:04

Typically? Nothing. (Spaces) Not that directories can't have extensions, it's just that most programs didn't use them.

According to Wikipedia and this site: directory entry names were padded with blanks. Spaces. ASCII 0x20 (32).

share|improve this answer
I mean, nothing as in what? What is that nothing? The room for the extension is there. What is stored in it? – AndrejaKo Nov 22 '11 at 14:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .