Is there a way to delete all files in a folder that are over a month old using Tasker?


That's rather a question of shell stuff. See this example shell command:

find /some/dir -ignore_readdir_race -cmin -depth -mindepth 1 -maxdepth 1 -type f +1440 ! -execdir fuser -s {} 2>/dev/null \; -delete

This would delete all files in /some/dir which are older than 1440 minutes (i.e. 24h). Just multiply the 1440 by 30 to get 1 month, and fire the command via a time-based profile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.