LONG FILENAMES How does Windows 95 stores LONG FILENAMES? This file was worked out by Jozsef Hidasi Hidasi.Jozsef@MTTBBS.hu -- [ Contact Info > ] -------------------------------------------------------- If you realize any mistakes, please contact me and let me know, to correct it! Thanks for everybody who helps to make this dox up to date! Don's hesitate contact me! Jozsef Hidasi E-Mail: Hidasi.Jozsef@MTTBBS.hu FIDO: 2:371/4.13 (At the moment this is my BBS :-) You can write to SysOp?! -- [ WARNING! > ] ------------------------------------------------------------ This text contains the most info I know at the moment! I'm not responsible for any DATA LOST! "???" Means I don't know what that field means... -- [ What this doxument about? > ] ------------------------------------------- This document contains some info how Windows'95 stores the long filenames. I don't know How long filenames can be handled by windows but as I calculated a file entry can be 832 bytes long. (See below) Windows uses a simple methold to hide a file from DOS, it changes the "file"'s attribute to VolumeLabel. Basicly a disk can have only one VolumeLabel, and this attrib is not used any more as other files! In this way we can make difference between DOS File Rec. (I won't describe it now) and Windows Record. Eighter Dos File and Windows Record are 32 bytes long. (DOS file Record is the main file descriptor, date/time/attrib/etc...) Windows Record> OFFSET Count Type Description Remark ------------------------------------------------------------------ 0000h 1 byte Counter - 0001h 10 char FileName E1 Entry 1 000Bh 1 byte Attrib Always 0Fh 000Ch 2 word ??? 0 000Eh 12 char FileName E2 Entry 2 001Ah 2 word ??? 0 001Ch 4 char FileName E3 Entry 3 Counter: If attrib=0Fh and the counter>64 then Windows Entries will follow: Entry no.: Counter-'@' Filename: The FileName is cut in 3 parts... Because of DOS compatibility... ???: Reserved or don't know... Simple Example: Sector 19 ; Don't laught! This is a simple floppy :-) This is a simple DOS filenamed file> 00000000: 53 49 4D 50 4C 45 20 20 - 44 4F 53 20 00 03 B8 9D SIMPLE DOS . 00000010: 1F 25 1F 25 00 00 B9 9D - 1F 25 00 00 00 00 00 00 %%..%...... This is the first entry of the new Long filenamed file> (I've created this first and renamed by Windows) (This file is errased because of the filename's first byte is 0E5h) 00000020: E5 49 4D 50 4C 45 20 20 - 57 49 4E 20 00 2A C6 9D IMPLE WIN .*Ɲ 00000030: 1F 25 1F 25 00 00 C7 9D - 1F 25 00 00 00 00 00 00 %%..ǝ%...... This is the first windows entry. The Filename's first byte (Counter) is C so 4 entryes will follow ... (One entry can hold 13 characters of the Long Filename...) This entry holds "m e d F i l e "=Filename E1+Filename E2+Filename E3 (See bellow) This means that the first entry holds the last characters of the long filename... 00000040: 43 6D 00 65 00 64 00 20 - 00 46 00 0F 00 44 69 00 Cm.e.d. .F..Di. 00000050: 6C 00 65 00 00 00 FF FF - FF FF 00 00 FF FF FF FF l.e..... Here is the next entry> Counter=2 means this is the 2nd entry of 3... Holds: " a L o n g F i l e n a" 00000060: 02 20 00 61 00 20 00 4C - 00 6F 00 0F 00 44 6E 00 .a. .L.o..Dn. 00000070: 64 00 46 00 69 00 6C 00 - 65 00 00 00 6E 00 61 00 g.F.i.l.e...n.a. Here is the next entry> Counter=1 means this is the 1nd entry of 3... Holds: "S i m p l e . w i n i s " 00000080: 01 53 00 69 00 6D 00 70 - 00 6C 00 0F 00 44 65 S.i.m.p.l..De. 00000090: 2E 00 77 00 69 00 6E 00 - 20 00 00 00 69 00 73 00 ..w.i.n. ...i.s. Here is the next entry> Counter="0" means this is the 1nd entry of 3... This entry holds the file's genereal info like date/time/attrib/length/etc... and DOS filename... 000000A0: 53 49 4D 50 4C 45 7E 31 - 57 49 4E 20 00 2A C6 9D SIMPLE~1WIN .*Ɲ 000000B0: 1F 25 1F 25 00 00 C7 9D - 1F 25 00 00 00 00 00 00 %%..ǝ%...... -------------------------- Summary> DOS Filename: simple~1.win Long Filename: Simple.win is a LongFilenamed file... * A chracter ha a 0 after all characters, i don't know why! The followings are empty: 000000C0: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................ 000000D0: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................ Well, that's all i can write now, but it's quite hard to explain how does this work! Write me a letter instead... :-) -- [ End of document > ] ----------------------------------------------------- Best wishes, Hidi...