How to Automatically Delete Old Files by Age (Windows and Mac)
Automatically delete files older than 30, 60, or 90 days on Windows and Mac — safely. Use age-based rules instead of forfiles, Task Scheduler, or cron scripts.
To automatically delete files older than a set number of days, create a rule that matches files by age and removes them. In File Arbor, you watch a folder, set the match to "older than 30 days" (or 60, or 90), and pick an action: Move to Recycle Bin for safe cleanup, or Delete permanently to reclaim disk space. Run it on a schedule and the folder maintains itself — on Windows and Mac, with no scripts.
This guide covers both the safe way and the space-reclaiming way, the built-in alternatives, and how File Arbor keeps an age-based delete rule from doing something you did not intend.
The folders that fill up on their own
Some folders are append-only by nature. A screen-recording folder. Security-camera footage. Application logs. A scanner's output directory. Nothing in them needs to live forever, but nobody wants to open them every week and shift-delete the old stuff.
The maintenance rule is always the same sentence: "remove everything older than N days." It is a perfect job to automate, and a bad job to do by hand — by the time the folder is annoying, there are thousands of files in it.
The built-in ways (and why they get tedious)
Both operating systems can do this without extra software, if you are comfortable with the command line.
On Windows, forfiles plus Task Scheduler is the classic recipe. A command like forfiles /p "C:\Logs" /d -30 /c "cmd /c del @file" deletes files older than 30 days, and Task Scheduler runs it on a timer. It works, but you are editing date math in a batch argument and there is no record of what got deleted.
On macOS, the equivalent is a find command in a shell script, scheduled with cron or launchd — for example find ~/Downloads -mtime +30 -delete. Also effective, also a thing you have to write, test, and remember you set up.
Both work. Both are invisible once they run, give you no history, and are easy to misconfigure in a way you only notice when something you wanted is gone. If you would rather see the rule, see what it did, and have a safety net, a dedicated tool is the better fit.
The safe way: Move to Recycle Bin
The lowest-risk way to auto-delete is to not really delete. Move to Recycle Bin sends matched files to the Recycle Bin on Windows or the Trash on macOS, so anything a rule catches by mistake can be restored by hand.
A common setup, free-plan friendly:
- Watch:
Desktop - Match: name starts with
Screenshot, older than 30 days - Action: Move to Recycle Bin
Old screenshots disappear from the Desktop but sit recoverable in the Recycle Bin until you empty it. This action is part of the free plan, and the free plan's 20-files-per-day limit applies to it like any other action. For a deeper look at this approach, see how to automatically move files to the Recycle Bin.
The space-reclaiming way: Delete permanently
The Recycle Bin has a catch: it does not free disk space until you empty it. For folders that grow by gigabytes a day, routing terabytes through the Recycle Bin defeats the point — the disk never recovers.
Delete permanently (Pro) removes files outright. This is the action for high-volume, append-only folders. The real example that drove the feature: someone managing security-camera footage, where hundreds of gigabytes land daily and the only maintenance the folder needs is "remove everything older than 60 days."
- Watch:
D:\Camerawith subfolder scanning on - Match: older than 60 days
- Action: Delete permanently
- Mode: scheduled, daily at 03:00
Set it once and the archive caps its own size.
How File Arbor keeps permanent delete safe
Permanent means permanent, so the action has guardrails built in:
- A confirmation checkbox must be ticked before a delete rule can be saved. You cannot create one by accident.
- It only ever operates inside the watched folder. A rule on
D:\Cameracannot reach anything outsideD:\Camera. - It never follows a symlink out of the watched folder, so a link cannot trick a rule into deleting elsewhere.
- Permanently deleted files are not added to undo history — there is nothing to undo, and the app is honest about that rather than implying a recovery that does not exist.
If you want a recovery net, use Move to Recycle Bin. If you want the space back immediately and the folder is genuinely disposable, use Delete permanently. Pick per rule.
Run it on a schedule
Age-based cleanup rarely needs to happen the instant a file ages past the threshold. Scheduling fits it better.
File Arbor can run a rule on a schedule — daily at a set time, or on the days you choose. For a large folder, a nightly 3 AM run keeps it trimmed without touching it during the day. You can also use Auto Mode for real-time action or run rules manually. Scheduled runs are the natural choice for "delete old files" because the work is periodic by nature.
See what was removed
Automation you cannot inspect is automation you cannot trust. The Action History records every removal — what file, which rule, and when. For Recycle Bin deletions, that is also your recovery path: find what a rule caught, restore it from the Recycle Bin by hand. It turns "I think the cleanup ran" into "here is exactly what it did."
FAQ
How do I automatically delete files older than 30 days?
Create a rule that matches files by age and set the action to delete. In File Arbor, watch the folder, set the match to "older than 30 days," and choose Move to Recycle Bin for safe cleanup or Delete permanently to reclaim space. Run it on a schedule and it maintains itself.
Can deleted files be recovered?
It depends on the action. Files removed with Move to Recycle Bin can be restored from the Recycle Bin or Trash by hand. Files removed with Delete permanently cannot be recovered, which is why that action is Pro-only and requires an explicit confirmation when you create the rule.
Is it safe to auto-delete old files?
Yes, when the rule is scoped correctly. File Arbor only ever acts inside the folder you tell it to watch, never follows symlinks out of that folder, and requires a confirmation checkbox before a permanent-delete rule can be saved. Use Move to Recycle Bin if you want a recovery safety net.
Do I need Pro to delete old files automatically?
Not for Recycle Bin cleanup. Move to Recycle Bin is available on the free plan. Delete permanently — which frees disk space immediately and skips the Recycle Bin — is a Pro feature, because it cannot be undone.
Can I delete old files on a schedule instead of in real time?
Yes. File Arbor can run a rule on a schedule, such as daily at 3 AM, so cleanup happens during off-hours. You can also run it in real time with Auto Mode or manually on demand. Scheduled runs suit large folders that only need periodic maintenance.
Set the rule once
Pick the folder that fills up on you, decide whether you want a safety net or the space back, and write one age-based rule. Download File Arbor to set it up, or see everything new in version 1.1.0. First time here? The getting started guide walks through your first rule.
