Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #6607 > unrolled thread
| Started by | Bob Latham <bob@sick-of-spam.invalid> |
|---|---|
| First post | 2026-02-24 12:21 +0000 |
| Last post | 2026-02-24 21:50 +0000 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.sys.acorn.programmer
OS_File case sensitive Bob Latham <bob@sick-of-spam.invalid> - 2026-02-24 12:21 +0000
Re: OS_File case sensitive Steve Fryatt <news@stevefryatt.org.uk> - 2026-02-24 19:20 +0000
Re: OS_File case sensitive Bob Latham <bob@sick-of-spam.invalid> - 2026-02-24 21:50 +0000
| From | Bob Latham <bob@sick-of-spam.invalid> |
|---|---|
| Date | 2026-02-24 12:21 +0000 |
| Subject | OS_File case sensitive |
| Message-ID | <5cb028ab62bob@sick-of-spam.invalid> |
I'm trying to find a way to check if a directory on a NAS contains any music files. .flac .mp3 .m4a I've had the realisation this morning that OS_File 13 is case sensitive so setting R1 to point to */flac will not cut it. So to find if a (NAS) directory contains any flac files it looks like I would need to test for flac and Flac and FLAC etc. any combination. The only solution I can see is to use OS_GBPB to read the name of file after file and mask out the upper lower case bit ie &DF and if nothing is found early I have to read every name in the directory. Is there a better way? Cheers, Bob.
[toc] | [next] | [standalone]
| From | Steve Fryatt <news@stevefryatt.org.uk> |
|---|---|
| Date | 2026-02-24 19:20 +0000 |
| Message-ID | <mpro.taz9qr00o36wd05mv.news@stevefryatt.org.uk> |
| In reply to | #6607 |
On 24 Feb, Bob Latham wrote in message
<5cb028ab62bob@sick-of-spam.invalid>:
> I'm trying to find a way to check if a directory on a NAS contains any
> music files. .flac .mp3 .m4a
>
> I've had the realisation this morning that OS_File 13 is case sensitive so
> setting R1 to point to */flac will not cut it. So to find if a (NAS)
> directory contains any flac files it looks like I would need to test for
> flac and Flac and FLAC etc. any combination.
That sounds like the underlying filing system, not OS_File. The NAS is
probably running some Linux-y FS that's case sensitive, and therefore
Music.FLAC and Music.Flac are actually two different files, which can both
exist together.
> The only solution I can see is to use OS_GBPB to read the name of file
> after file and mask out the upper lower case bit ie &DF and if nothing is
> found early I have to read every name in the directory.
>
> Is there a better way?
Make sure that your filing system's filetype mapping is sensible (whether it
uses MimeMap or its own arrangement) and test on filetypes? That way, it
would be the FS's problem to do the extension parsing.
It should work, but in the best traditions of Usenet, I've not tried it...
--
Steve Fryatt - Leeds, England
http://www.stevefryatt.org.uk/
[toc] | [prev] | [next] | [standalone]
| From | Bob Latham <bob@sick-of-spam.invalid> |
|---|---|
| Date | 2026-02-24 21:50 +0000 |
| Message-ID | <5cb05cc7febob@sick-of-spam.invalid> |
| In reply to | #6608 |
In article <mpro.taz9qr00o36wd05mv.news@stevefryatt.org.uk>, Steve Fryatt <news@stevefryatt.org.uk> wrote: > On 24 Feb, Bob Latham wrote in message > <5cb028ab62bob@sick-of-spam.invalid>: > > I'm trying to find a way to check if a directory on a NAS > > contains any music files. .flac .mp3 .m4a > > > > I've had the realisation this morning that OS_File 13 is case > > sensitive so setting R1 to point to */flac will not cut it. So to > > find if a (NAS) directory contains any flac files it looks like I > > would need to test for flac and Flac and FLAC etc. any > > combination. > That sounds like the underlying filing system, not OS_File. The NAS > is probably running some Linux-y FS that's case sensitive, and > therefore Music.FLAC and Music.Flac are actually two different > files, which can both exist together. Oh, didn't think of that. > > The only solution I can see is to use OS_GBPB to read the name of > > file after file and mask out the upper lower case bit ie &DF and > > if nothing is found early I have to read every name in the > > directory. > > > > Is there a better way? > Make sure that your filing system's filetype mapping is sensible > (whether it uses MimeMap or its own arrangement) and test on > filetypes? That way, it would be the FS's problem to do the > extension parsing. I'd love to but flac and mp3 are fine but no mime map for m4a. Thanks. Bob.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.acorn.programmer
csiph-web