VOGONS


First post, by Errius

User metadata
Rank l33t
Rank
l33t

If a directory contains the following files:

BAR.FILE
FOOBAR.FILE

then DIR BAR.* will only find the first, as expected. However if the files are

FILE.FOO
FILE.FOOBAR

then searching DIR *.FOO finds BOTH files. This behavior is also present in Windows 98 SE, and I assume in all other Windows versions since 95.

(This does not happen if files are

B.C
AB.C

and

C.A
C.AB

in which case DIR B.* and DIR *.A have the expected results.)

Last edited by Errius on 2022-02-05, 18:05. Edited 1 time in total.

"This all reminds me when i took the windows vista sticker thingy off my old laptop, and on my washing machine as a joke. A few days later said washing machine stopped working. I still think this cannot be a coincidence."

Reply 2 of 2, by Errius

User metadata
Rank l33t
Rank
l33t

OK, I've figured it out. Windows is looking at the 8.3 filenames. DIR *.FIL also returns BAR.FILE and FOOBAR.FILE because of this. (You can see the 8.3 filenames with DIR /X)

I disabled creation of 8.3 filenames with fsutil behavior set disable8dot3 1 then copied the files to a new directory, and now the DIR command works as it should, i.e. DIR *.FOO returns only FILE.FOO.

"This all reminds me when i took the windows vista sticker thingy off my old laptop, and on my washing machine as a joke. A few days later said washing machine stopped working. I still think this cannot be a coincidence."