Count all files and subfolder files within a folder

Nov 09, '04 08:51:00AM

Contributed by: nilswerk

As strange as it seems, there is no simple way in the Finder to count all files in a folder, including the files in the subfolders. Some solutions were discussed in an earlier macosxhints article, but there is also a straightforward way to do this using AppleScript.

Copy and paste this script into Script Editor, and save it as an Application. Then just drag and drop a folder onto the icon, and you'll get a file count. You can also download the completed droplet from its VersionTracker page.

[robg adds: This works, but be aware that the total presented does not include the subfolders themselves -- it just counts the files themselves.]

Comments (12)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20041106155934189