File count in a folder

I found this answer very helpful: how to count files and folders separately - Apple Community


But there is one issue and I am unable to get to the bottom of it.


There is a difference of around 7 files in file count from the script editor (9009) and the count if I use the Finder window, that is press command + F on the particular folder in the Finder window (9002). There are only music files in this folder with three extensions - mp3, m4a, and m4p. How do I find out what the are the 7 extra files shown in the count in the script editor? Any ideas?


Thanks!

Posted on Sep 2, 2019 1:03 AM

Reply
4 replies

Sep 4, 2019 2:53 AM in response to Niel

Hi Neil,


Thanks for responding. I haven't made a copy of the folder in question. I used the script on the folder, and the count is 9009. I used the Finder window inspector on the same folder, the count is 9002. So when you say 'Get the full list of items from the folder in both places', I am not sure I follow. And there aren't any hidden files in the folder other than the DS_Store metadata file. I am planning to copy everything over to a new folder and check again, later this week.


But the script in itself is very efficient in getting the count of files quickly. Thank you for that in the first place! I accidentally noticed that using the Cmd + F shortcut on that folder and checking the count provides a slightly different number and wanted to find out why or how.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

File count in a folder

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.