From: "Gary Hubbard" Newsgroups: comp.os.msdos.djgpp Subject: Command line wildcard expansion under Win2K Date: Wed, 29 Jan 2003 09:50:16 -0800 Organization: LBNL News Server Lines: 47 Message-ID: References: NNTP-Posting-Host: ldv.dhcp.lbl.gov X-Trace: overload.lbl.gov 1043862326 18224 128.3.183.41 (29 Jan 2003 17:45:26 GMT) X-Complaints-To: "newsmaster AT lbl DOT gov" NNTP-Posting-Date: Wed, 29 Jan 2003 17:45:26 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com The wildcard expansion is certainly not doing what I would expect. I tried looking at the source and in the few minutes I have at the moment could not really make sense of the case sensitivity logic. Clearly the environment variable FNCASE is involved somehow. As near as I can determine empirically, setting FNCASE=N (the defaults neems to be Y), cause the matches to be case insensitive at the price of returning the names converted to upper case. Somehow all of this seems to be strange to me. Since all Microsoft operating systems have case preserved but insensitive filenames, it seems like the glob function should effectively convert the pattern each prospective filename match to lower case and then if fnmatch() succeeds, the original (un-lower cased) filename should be returned. In the ideal world, this would not occur for non-Microsoft filesystems. Gary "Eli Zaretskii" wrote in message news:Pine DOT SUN DOT 3 DOT 91 DOT 1030129080002 DOT 11962C AT is... > > On Tue, 28 Jan 2003, Charles Sandmann wrote: > > > I see this behavior. For example, "A.vec" exists (A upper case): > > > > C:\>djecho a*.vec A*.vec A*.VEC a*.VEC > > a.vec A.vec A*.VEC a*.VEC > > > > This behavior is not Win2K specific - it also happens on Win98 > > > > "B.VEC" exists (all upper case): > > > > C:\>djecho b*.vec B*.vec b*.VEC B*.VEC > > b.VEC B*.vec b*.VEC B.VEC (on Win98, either build) > > B.VEC B*.vec b*.VEC B.VEC (Win2K, v2.03 refresh) > > b.vec B*.vec b*.VEC B.VEC (Win2K, CVS build) > > I think this is the intended behavior. The docs of `glob' should > describe it. In particular, file names that fit 8+3 DOS limits (like > B.VEC in this case) are downcased by default. > > > It is certainly not what I would expect. > > Even after reading the docs? If so, why not? Does setting "FNCASE=y" > change the behavior to something that you like better?