From: "Gary Hubbard" Newsgroups: comp.os.msdos.djgpp Subject: Re: Command line wildcard expansion under Win2K Date: Thu, 30 Jan 2003 07:50:58 -0800 Organization: Sandia National Laboratories, Albuquerque, NM USA Lines: 35 Message-ID: References: NNTP-Posting-Host: hubbardpc.ran.sandia.gov X-Trace: sass2141.sandia.gov 1043941824 26768 134.252.7.230 (30 Jan 2003 15:50:24 GMT) X-Complaints-To: usenet AT sass2141 DOT sandia DOT gov NNTP-Posting-Date: Thu, 30 Jan 2003 15:50:24 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com It is obvious I am not really making mysef clear here. I will read the doc's for glob() more carefully and examine the code as well, but if I read these posts correctly there are problems. I originally found out about this when a program, written by someone else, created a set of files on a NTFS 5 partition of Win2K. These are long filenames and are entirely a mixture of upper case letters and numbers. My program's users were trying to access these files, using wildcards, with lower case letters. Presumably this was simply to avoid using the shift key. Of course, that would work for any native Microsoft provided program, such as dir. The wildcard pattern matched no files at all. Changing to upper case worked around that problem. It is possible that something else is going on here, like Microsoft attempting to provide 8.3 versions of the names as well when findfirst/findnext is executed. I will have to experiment. On my suggestion of a different algorithm. What I meant (simpilified to one dictory level) was the equivalent of pattern = lowercase(pattern) while (filename = getdirectoryentry()) { if match(pattern,lowercase(filename)) do something with filename (still in its original case) } This should work for 8.3 filesystems. You guys are doing wonderful work. If the behaviour I am looking for is wrong for you for any reason, I will simply replace glob() by one of my own choosing. For my development system, I really don't care much about this but it is simply too hard to explain this to everyone else, most of which have never seen a case sensitive operating system in the first place. Gary