利用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