I'm trying to create an automator workflow or application that, when activated, deletes all the files and subfolders in my Downloads folder that have not been created, modified, added, opened, or accessed in any way in the last 30 days.
I tried filtering like this:
But that doesn't really do the job like I want it. First of all, there's no option to filter by "date added", which I would really like. Secondly, I would prefer it to prioritize a subfolder over that subfolder's contents. For example, I have a folder which I added today, but the file inside that folder has a "date added" of much longer ago. My preference would be that that folder, including its contents, are ignored and therefor not deleted.
Then I read in another stackoverflow thread (or it was at least some stackexchange site) that someone recommended to use a bash script instead. Something like this for example:
$ find "$HOME/Downloads" -type fd -mtime 30d -atime 30d -iname '*.*'
But even that doesn't seem to filter out the exact items that I want to filter out.
Can anyone help me out here?