Any idea how to filter out the “.metadata” folders from the example below? I’m trying to set up some analyses for Homebrew Casks and Formulae on our MacOS devices. I’ve been messing around with this off and on for 2 days without success. Thanks in advance!
Q: (names of it, names of folders of it) of folders of folder "/opt/homebrew/Caskroom"
A: beyond-compare, .metadata
A: beyond-compare, 4.4.6.27483
A: cisco-jabber, .metadata
A: cisco-jabber, 20220728050403
A: cyberduck, .metadata
A: cyberduck, ( 8.5.9,39636 )
A: gimp, .metadata
A: gimp, 2.10.34-1
T: 6868
1 Like
I think a whose() filter should do it…try
Q: (names of it, names whose (it != ".metadata") of folders of it) of folders of folder "/opt/homebrew/Caskroom"
2 Likes
That did the trick. Thank you so much!
1 Like
If anyone else finds a need for it, this is what we ended up using:
Property:
Homebrew Casks
Relevance:
if (family name of main processor contains "Apple" AND exists file "/opt/homebrew/bin/brew" AND exists folder "/opt/homebrew/Caskroom" whose (number of folders of it > 0)) then ((names of it, names whose (it != ".metadata") of folders of it) of folders of folder "/opt/homebrew/Caskroom" as string) else if (family name of main processor does not contain "Apple" AND exists file "/usr/local/Homebrew/bin/brew" AND exists folder "/usr/local/Caskroom" whose (number of folders of it > 0)) then ((names of it, names whose (it != ".metadata") of folders of it) of folders of folder "/usr/local/Caskroom" as string) else ("N/A")
Property:
Homebrew Formulae
Relevance:
if (family name of main processor contains "Apple" AND exists file "/opt/homebrew/bin/brew" AND exists folder "/opt/homebrew/Cellar" whose (number of folders of it > 0)) then ((names of it, names whose (it != ".metadata") of folders of it) of folders of folder "/opt/homebrew/Cellar" as string) else if (family name of main processor does not contain "Apple" AND exists file "/usr/local/Homebrew/bin/brew" AND exists folder "/usr/local/Cellar" whose (number of folders of it > 0)) then ((names of it, names whose (it != ".metadata") of folders of it) of folders of folder "/usr/local/Cellar" as string) else ("N/A")
1 Like