set DateStr to (do shell script "perl -e '($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time - 15 * 86400); printf (\"%04d%02d%02d-%02d%02d%02d\", $year+1900, $mon+1, $mday, $hour, $min, $sec);'") set FileName to "_@_" & DateStr set the item_list to list folder "Macintosh HD:Users:user:.Trash:" without invisibles repeat with i from 1 to number of items in the item_list set this_item to item i of the item_list if this_item is less than FileName then do shell script "cd ~/.Trash; rm -R \"" & this_item & "\"" end if end repeat