[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: msdos long filename case change when no short entry



On 8 Dec 2000, at 16:04, Stephen Gutknecht (OBSD Misc) wrote:

> Under OpenBSD 2.8 I'm finding that filename case is not preserved when
> looking at a MS-DOS floppy drive.  If the filename is a "long filename" it
> does show case correctly, but when it is a "short filename" in lowercase...
> OpenBSD shows it in ALL UPPER.

I suspect that it isn't OpenBSD that isn't preserving the filename 
case, it's your M$ box that's doing it wrong.

> As I understand it, when MS-DOS writes a filename with lowercase characters
> in it, it writes two both a short and a long.  But it seems that OpenBSD
> ignores the "long entry" in this case.
> 
> Example, directory under Windows 2000:

Please remember that Windows 2000 does NOT have a true MS-DOS prompt. 
It has a command window, but this is no longer MS-DOS.  

>  Volume in drive A has no label.
>  Volume Serial Number is EA0C-259B
> 
>  Directory of a:\html1
> 
> 12/08/2000  03:30p      <DIR>          .
> 12/08/2000  03:30p      <DIR>          ..
> 10/30/1998  04:58p                 622 arrow-down1.gif
> 12/08/2000  10:48a                 824 basic01.css
> 12/08/2000  09:50a                 877 default.htm
> 06/11/2000  07:19p               7,499 dynaEdit-background01.jpg
> 12/08/2000  10:25a               1,878 dynaEditHelp1.asp
> 12/08/2000  12:29p               6,819 fieldWork1.js
> 10/30/1998  04:35p                 617 fl2100.gif
> 10/30/1998  04:59p                 622 fl2210.gif
> 12/08/2000  12:12p               7,652 inputFields1.js
> 06/12/2000  01:43p               1,250 inputHelpers1.js
> 06/07/2000  09:08p               2,415 newRow1.gif
> 06/07/2000  09:13p               2,789 newRow2.gif
> 06/09/2000  03:00p               2,956 rowWork1.js
> 12/06/2000  09:26p               9,568 rs1.txt
> 12/06/2000  09:26p               9,568 rs2.txt
> 12/08/2000  11:06a               3,819 sortTable1.js
> 12/07/2000  04:30p               3,733 sorttest1.html
> 12/07/2000  06:51p              24,277 try1-moz.html
> 12/08/2000  03:50p              21,135 try1-ssi.shtml
> 12/08/2000  12:07p              21,679 try1.html
> 12/08/2000  03:44p                  81 openbsd-tips1.txt
>               21 File(s)        130,680 bytes
>                2 Dir(s)       1,305,088 bytes free
> 
> Under OpenBSD here is my session:
> 
> mybsdbox1# mount_msdos -l /dev/fd0a /mnt
> mybsdbox1# ls /mnt/html1
> BASIC01.CSS                dynaEdit-background01.jpg  openbsd-tips1.txt
> DEFAULT.HTM                dynaEditHelp1.asp          rowWork1.js
> FL2100.GIF                 fieldWork1.js              sortTable1.js
> FL2210.GIF                 inputFields1.js            sorttest1.html
> RS1.TXT                    inputHelpers1.js           try1-moz.html
> RS2.TXT                    newRow1.gif                try1-ssi.shtml
> arrow-down1.gif            newRow2.gif                try1.html
> mybsdbox1#
> 
> As you can see, files like "RS1.TXT" and "DEFAULT.HTM" show up as upper case
> under OpenBSD.
> 
> Under Windows 2000 if I do a "dir /X" against the directory all the files
> that show up incorrect have _nothing_ (black) in the short filename
> category!  In other words, they have only a "long filename" and it is the
> lowercase one.

AFAIK the way Win9x and WinNT/2k handle FAT file tables, which is 
what you have on a floppy, is to have two filenames for each file.  
One is an 8.3 filename, case-insensitive, stored all in upper case.  
The "long filename" is stored in a hidden part of the FAT.  It looks 
as if the 8.3 filename is not being displayed on Win2k.  But it is 
clearly there, as shown by your BSD box. What happens if you do a dir 
of the floppy on a Win9x/ME machine?  

> The floppy in question was formatted and used exclusively on Windows 2000
> before it was ever put into the OpenBSD box.  So Windows 2000 created the
> directory structure entirely...
> 
> Especially on web files where some of these are includes (such as the file
> "basic01.css") this prevents me from copying the entire directory... I have
> to rename them to get them on the OpenBSD side to get the filename cases to
> match.

ISTM that once again Micro$oft has broken the standard.  Ain't it 
wonderful sharing the forest with a 900-poind gorilla?


In freedom,

                   Angus
                   (angusw@geoapps.com)
--------------------------------