Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #6107

Re: case sensitive file test

From Kevin Wells <kev@kevsoft.co.uk>
Newsgroups comp.sys.acorn.programmer
Subject Re: case sensitive file test
Date 2020-05-26 15:34 +0100
Organization Aioe.org NNTP Server
Message-ID <c775bd7658.Kevin@Kevsoft> (permalink)
References <5876ae0c64bob@sick-of-spam.invalid> <5876b6c3c3bob@sick-of-spam.invalid>

Show all headers | View raw


In message <5876b6c3c3bob@sick-of-spam.invalid>
          Bob Latham <bob@sick-of-spam.invalid> wrote:

>In article <5876ae0c64bob@sick-of-spam.invalid>,
>   Bob Latham <bob@sick-of-spam.invalid> 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.

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

case sensitive file test Bob Latham <bob@sick-of-spam.invalid> - 2020-05-26 12:46 +0100
  Re: case sensitive file test Bob Latham <bob@sick-of-spam.invalid> - 2020-05-26 14:21 +0100
    Re: case sensitive file test Kevin Wells <kev@kevsoft.co.uk> - 2020-05-26 15:34 +0100
      Re: case sensitive file test Steve Fryatt <news@stevefryatt.org.uk> - 2020-05-26 17:12 +0100
        Re: case sensitive file test Bob Latham <bob@sick-of-spam.invalid> - 2020-05-26 17:42 +0100
          Re: case sensitive file test Steve Fryatt <news@stevefryatt.org.uk> - 2020-05-26 18:21 +0100
            Re: case sensitive file test Bob Latham <bob@sick-of-spam.invalid> - 2020-05-26 19:46 +0100
        Re: case sensitive file test Steve Drain <steve@kappa.me.uk> - 2020-05-27 13:14 +0100
          Re: case sensitive file test jgh@mdfs.net - 2020-05-27 16:25 -0700
            Re: case sensitive file test Steve Drain <steve@kappa.me.uk> - 2020-05-28 14:16 +0100
              Re: case sensitive file test druck <news@druck.org.uk> - 2020-06-01 20:01 +0100
      Re: case sensitive file test Bob Latham <bob@sick-of-spam.invalid> - 2020-05-26 17:29 +0100
        Re: case sensitive file test Steve Fryatt <news@stevefryatt.org.uk> - 2020-05-26 17:52 +0100
          Re: case sensitive file test Bob Latham <bob@sick-of-spam.invalid> - 2020-05-26 18:06 +0100
        Re: case sensitive file test "John Williams (News)" <UCEbin@tiscali.co.uk> - 2020-05-26 18:00 +0100
          Re: case sensitive file test "John Williams (News)" <UCEbin@tiscali.co.uk> - 2020-05-26 18:07 +0100
          Re: case sensitive file test Bob Latham <bob@sick-of-spam.invalid> - 2020-05-26 19:40 +0100
    Re: case sensitive file test David Higton <dave@davehigton.me.uk> - 2020-05-26 18:08 +0100
      Re: case sensitive file test Bob Latham <bob@sick-of-spam.invalid> - 2020-05-26 19:40 +0100
  Re: case sensitive file test Erik G <noreply123@xs4all.nl> - 2020-06-01 03:19 +0200
    Re: case sensitive file test Bob Latham <bob@sick-of-spam.invalid> - 2020-06-01 15:53 +0100
    Re: case sensitive file test druck <news@druck.org.uk> - 2020-06-01 20:57 +0100
    Re: case sensitive file test jgh@mdfs.net - 2020-06-04 09:23 -0700
      Re: case sensitive file test Martin <News03@avisoft.f9.co.uk> - 2020-06-04 17:51 +0100
      Re: case sensitive file test druck <news@druck.org.uk> - 2020-06-04 20:49 +0100
        Re: case sensitive file test jgh@mdfs.net - 2020-06-04 16:18 -0700
          Re: case sensitive file test druck <news@druck.org.uk> - 2020-06-05 11:27 +0100

csiph-web