I'm trying to count all the files of a certain type in a folder in an AppleScript I'm writing. Does anybody know how to do this. I can't count all the files in the folder with the following code:
set NoOfFiles to count each file in theFolder
But, I can't figure out how to only count a particular type of file (in this case FLAC files). Ideally I'd like a way to count files that have a particular extension, but counting based on the "kind" attribute in the finder would be ok too.
set NoOfFiles to count each file in theFolder
But, I can't figure out how to only count a particular type of file (in this case FLAC files). Ideally I'd like a way to count files that have a particular extension, but counting based on the "kind" attribute in the finder would be ok too.