Results 1 to 1 of 1
  1. #1

    Member Since
    May 21, 2013
    What's wrong with my AppleScript?
    I got help from someone to create a script that deletes files in a specific folder after they are more than 2 days old. However, sometimes I get an error message (see attached). The script (see below) is saved as an application that I run automatically at login. If anyone can see something that I'm doing wrong, my appreciation would runneth over. Thank you!

    set targetDate to (get current date) - 1 * days
    tell application "System Events"
    set filesToGo to path of (every disk item of folder "Mac HD:Users:bbotticelliropbox:Brian:Sound Beach Cameras" whose modification date is less than targetDate and visible is true)
    tell application "Finder" to delete filesToGo
    end tell
    Attached Images Attached Images

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Correct me if I'm wrong( I hope I'm wrong)
    By dero in forum Apple Desktops
    Replies: 8
    Last Post: 05-09-2011, 11:30 PM
  2. Help with Applescript
    By shades.of.gray in forum OS X - Operating System
    Replies: 0
    Last Post: 05-10-2010, 03:06 AM
  3. Help with my Applescript
    By katsogiannis in forum OS X - Operating System
    Replies: 0
    Last Post: 01-10-2010, 05:28 PM
  4. Applescript Help
    By niclake13 in forum OS X - Apps and Games
    Replies: 1
    Last Post: 08-10-2009, 02:47 AM
  5. wrong adapters with wrong notebooks
    By themitch in forum Apple Notebooks
    Replies: 5
    Last Post: 04-23-2009, 04:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts