A small macro to count subfolders

I have my music sorted in the common folder structure ~/Music/Artist/Album, so each album gets it's own subfolder. As many artists tend to release more than one album, over time you will have more album subfolders than artists.

From time to time I'd like to know how many albums I have in my music folder?

Maestro to the rescue (with a little help from good ol' Terminal):

The Shell Script bit:

cd ~/Music
ls -d */*/ | wc -l

Easily adaptable for other "info tasks" and hopefully useful for others too, so I post it here.

happy automatizing,
Roland

2 Likes

Nice. You might like to try the new Display Large option for this sort of very short info macros.