Path: csiph.com!aioe.org!.POSTED.PD3d+NWCkRT8D6/HLkbPiQ.user.gioia.aioe.org!not-for-mail From: Kevin Wells Newsgroups: comp.sys.acorn.programmer Subject: Re: case sensitive file test Date: Tue, 26 May 2020 15:34:59 +0100 Organization: Aioe.org NNTP Server Lines: 47 Message-ID: References: <5876ae0c64bob@sick-of-spam.invalid> <5876b6c3c3bob@sick-of-spam.invalid> NNTP-Posting-Host: PD3d+NWCkRT8D6/HLkbPiQ.user.gioia.aioe.org X-Complaints-To: abuse@aioe.org User-Agent: Messenger-Pro/8.04 (MsgServe/8.04) (RISC-OS/5.27) NewsHound/v1.52-32 X-Notice: Filtered by postfilter v. 0.9.2 Xref: csiph.com comp.sys.acorn.programmer:6107 In message <5876b6c3c3bob@sick-of-spam.invalid> Bob Latham wrote: >In article <5876ae0c64bob@sick-of-spam.invalid>, > Bob Latham wrote: >> Can someone tell me what is the best (speed wise) method of testing >> for a specific file but importantly the name in lower case. > >> I have a recursive program running which scans my music library. I >> want it to specifically test each album for the existence of a file >> 'folder/jpg' but to fail anything with a different case like >> 'Folder/jpg'. > >> OS_File 17 does not appear to be case sensitive. > >> The only way I can see is to read the contents of the directory >> using OS_GBPB 9 and wildcards and then test the characters for >> lower case. > >> I'm thinking that may be a lttle slow when doing thousands and i'm >> also struggling to make it work anyway. on a short test run it fails >> 7 out of 10 albums and all albums had folder.jpg in them. > >[Snip] > >Okay, found the problem (eventually) with OS_GBPB 9 buffer size! > >But if anyone has a good way to test for a lowercase file name I'd >love to hear it. If it is just the first letter that has to be lower case why not try for just the first letter by the letter code e.g lower case f is CHR$(102) while uppercase F is CHR$(70) > > > > Thanks > > Bob. > -- Kev Wells http://kevsoft.co.uk/ https://ko-fi.com/kevsoft carpe cervisium Idiot in search of a village.