- Joined
- Mar 28, 2006
- Messages
- 198
- Reaction score
- 5
I've got a script that is supposed to delete all files from specific folders that are older than 60 days... I tested it with only 2 folders set to delete and it worked perfectly... then I added all the other folders in the same manner... basically, I want it to check every day for files that are older than 60 days... When I ran it the first time I didn't have the "on idle" or "try" set... added those once it appeared to be functioning... Now I get an error that says "Finder got an error: can't make some data into the expected type."... it compiles as is but something must be wrong... little help?
on idle
try
tell application "Finder"
delete (every item of folder "Bailey-Originals" of folder "Bailey" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Bailey-Bad" of folder "Bailey" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Bailey-Good Reports" of folder "Bailey" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Bailey-Warning Reports" of folder "Bailey" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Lisa-Originals" of folder "Lisa" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Lisa-Bad" of folder "Lisa" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Lisa-Good Reports" of folder "Lisa" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Lisa-Warning Reports" of folder "Lisa" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Andrea-Originals" of folder "Andrea" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Andrea-Bad" of folder "Andrea" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Andrea-Good Reports" of folder "Andrea" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Andrea-Warning Reports" of folder "Andrea" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Birgit-Originals" of folder "Birgit" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Birgit-Bad" of folder "Birgit" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Birgit-Good Reports" of folder "Birgit" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Birgit-Warning Reports" of folder "Birgit" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Jennifer-Originals" of folder "Jennifer" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Jennifer-Bad" of folder "Jennifer" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Jennifer-Good Reports" of folder "Jennifer" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Jennifer-Warning Reports" of folder "Jennifer" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Megan-Originals" of folder "Megan" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Megan-Bad" of folder "Megan" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Megan-Good Reports" of folder "Megan" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Megan-Warning Reports" of folder "Megan" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
end tell
end try
end idle
thanks...
Zeyhra
on idle
try
tell application "Finder"
delete (every item of folder "Bailey-Originals" of folder "Bailey" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Bailey-Bad" of folder "Bailey" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Bailey-Good Reports" of folder "Bailey" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Bailey-Warning Reports" of folder "Bailey" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Lisa-Originals" of folder "Lisa" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Lisa-Bad" of folder "Lisa" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Lisa-Good Reports" of folder "Lisa" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Lisa-Warning Reports" of folder "Lisa" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Andrea-Originals" of folder "Andrea" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Andrea-Bad" of folder "Andrea" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Andrea-Good Reports" of folder "Andrea" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Andrea-Warning Reports" of folder "Andrea" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Birgit-Originals" of folder "Birgit" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Birgit-Bad" of folder "Birgit" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Birgit-Good Reports" of folder "Birgit" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Birgit-Warning Reports" of folder "Birgit" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Jennifer-Originals" of folder "Jennifer" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Jennifer-Bad" of folder "Jennifer" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Jennifer-Good Reports" of folder "Jennifer" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Jennifer-Warning Reports" of folder "Jennifer" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Megan-Originals" of folder "Megan" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Megan-Bad" of folder "Megan" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Megan-Good Reports" of folder "Megan" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
delete (every item of folder "Megan-Warning Reports" of folder "Megan" of disk "PitStop Server" whose modification date is less than ((get current date) - 60 * days))
end tell
end try
end idle
thanks...
Zeyhra