Auto-beeminding: Number of files on folder?

I’m too lazy to google this now: any ideas on automatically beeminding the number of files in folder (either on a Linux-powered computer, or Dropbox or Google Drive)
I have bank receipts in need of proper filling…

Using this bmndr CLI tool in conjunction with crontab should work great on Linux. For example if you want it checked every half hour you could have a line in your crontab file like

*/30 * * * * /path/to/bmndr the-goal `ls /path/to/the/folder | wc -l`

(Note it’s important to use the full path to bmndr and to the folder you want to count, since crontab jobs typically run as a different user and won’t have the same $PATH as you.)

If you’ve never used crontab before, all you have to do is create a file with a line like the above (I keep mine in a file named .crontab in my home directory) and then install it with the command crontab your-crontab-file, e.g. I would type crontab ~/.crontab .

I just tried this out to be sure and it worked great for me. Happy to help debug if you try it and run into issues.


Many thanks! No excuses left now… :smiley:

I should do this with my desktop and downloads folder!


Sexy! :smiley: :heart:

1 Like

This looks awesome. Thank you. How would one change this so it works on Mac? Thanks.

I’m not super familiar with Macs, but I don’t know of any reason that it would be any different. Did you try it and it didn’t work?

1 Like

Lemme give it a bash. I wasn’t aware the Linux stuff works directly in Mac. Thank you!


That’s so much simpler than the AppleScript/Automator/Shell thing that I set up.

Note that you can include multiple directories in that ls command.

You’ll probably want to change your Beeminder goal to ‘custom’ and the aggregation method to ‘min’ so that the smallest value for the day is what counts. Otherwise you might accidentally create beemergency days simply by adding things to the to-be-filed directory.