利用applescript清空下载文件夹
tell application "Finder"
set dls to folder "Downloads" of (path to home folder)
delete (every file of dls)
delete (every folder of dls)
end tell
同理可用于清空其他文件夹。把代码里的Downloads改成Desktop就可以
清空垃圾箱
tell application "Finder"
empty trash
end tell