Posted By

Macgeeky on 08/07/10


delete applescript downloads

Versions (?)

slett alt i Nedlastinger (Applescript)

 / Published in: AppleScript

Just a simple script that deletes everything in the Downloads folder, except for files that is labeled with the blue label in Finder (Color label this script blue, as a program in the Downloads folder, and click it to delete all the other files in Downloads).\r\n\r\n1. Save script as Program in the Downloads folder\r\n2. Label the program with the blue color label in Finder\r\n3. Everytime you would like to delete everything in the Downloads folder -> click this program (in Downloads stack in the Dock).\r\n\r\nPS! Remember to change \\'Robert\\' to your Mac OS username! \\"Robert\\" in line 2.

  1. tell application "Finder"
  2. set mappen to the folder "Mac HD:Users:Robert:Downloads"
  3. set filtrert to (files of mappen where label index is not 4)
  4. delete filtrert
  5. end tell

Report this snippet  

You need to login to post a comment.