Skip to main content
Tidy up

Clear old screenshots off your Mac Desktop

A DockRun workflow that moves screenshots older than a week from the Desktop into a Screenshots Archive folder. Nothing is deleted.

The button needs DockRun 0.1.19 or later. On an older version, download the file, then use Settings > Restore or Import… in DockRun.

Runs in DockRun Free, which holds 2 workflows.

What it does

  • Finds the files macOS itself marked as screenshots, so it works whatever language the file names are in.
  • Moves the ones older than the number of days you set (7 unless you change it) into Screenshots Archive.
  • Leaves every other file on the Desktop alone.

What you can change

  • days - Move screenshots older than this many days. Starts as: 7
  • folder - Where your screenshots are saved. Starts as: ~/Desktop

The steps

Read the script below before you add it. It is everything this workflow runs.

  1. 1. Move old screenshots
    Runs this zsh script · Arguments: {{var.days}} {{var.folder}} · Time limit: 60 seconds
    # Moves screenshots older than a number of days from a folder (default ~/Desktop) into "Screenshots Archive"
    # inside it. A file counts as a screenshot when macOS marked it as one, so the file name's language doesn't matter.
    days="${1:-7}"; shift 2>/dev/null
    folder="${*:-~/Desktop}"; folder="${folder/#\~/$HOME}"
    [[ "$days" == <-> ]] || { echo "Days must be a number: $days" >&2; exit 1 }
    [ -d "$folder" ] || { echo "No such folder: $folder" >&2; exit 1 }
    archive="$folder/Screenshots Archive"
    now=$(date +%s); moved=0
    for file in "$folder"/*(N.); do
      xattr -p com.apple.metadata:kMDItemIsScreenCapture "$file" >/dev/null 2>&1 || continue
      (( now - $(stat -f %m "$file") > days * 86400 )) || continue
      mkdir -p "$archive"
      [ -e "$archive/${file:t}" ] || { mv -n "$file" "$archive/" && moved=$((moved + 1)); }
    done
    echo "Moved $moved screenshots older than $days days to $archive"
    

After you add it

  1. DockRun shows what is in the file and asks before adding it. The workflow arrives turned off.
  2. Open it, read the steps, then turn on the On switch.
  3. Press Run. DockRun asks before a script runs; tick "Don't ask again for this exact step" once you trust it.

Good to know

Pair it with Run on a schedule (Pro) to keep the Desktop clear without thinking about it.

Last tested: 2026-11-12 · All workflows →

Curious if DockRun is right for you?

Let ChatGPT, Claude, or Perplexity look into it - click below and see what AI actually thinks about DockRun.

Clear old screenshots off your Mac Desktop | DockRun