Hi everybody!
I've been working on a script to move all of my files off of my desktop to my documents when I haven't modified them for three weeks, and than delete them from there when they haven't been modified for 60 days... and I'm stuck. It gives me this error when my folder names that it's moving to are wrong - Finder got an error: Can't get every file of folder "Desktop" of folder "student" of folder "Users" of disk "Macintosh HD" whose modification date < date "Tuesday, January 16, 2007 2:33:49 PM".
tell application "Finder"
move (every file of folder "Desktop" of folder "student" of folder "Users" of disk "Macintosh HD" whose modification date is less than ((get current date) - 21 * days)) to folder "Documents" of folder "MacBookUser" of folder "Users" of disk "Macintosh HD"
delete (every item of folder "Documents" of folder "student" of folder "Users" of disk "Macintosh HD" whose modification date is less than ((get current date) - 60 * days))
end tell
Thanks,
Mike
You're using two different usernames, "MacBookUser" and "student". At first glance I'd guess that's the issue.
Oops... I missed that the first time through, but, after I fixed that, it simply deleted all of the files in my desktop and documents folder as if it skipped over the date modified detail... any suggestions?
Thanks,
Mike