I have a script i put together with help from this site. It takes items from a folder older than 180 days and moves those items to another folder.
It works great on my desktop, but when i move to server it does not do anything. The folder its searching through has close to 17,000 items in it, with a quarter of them over the 180 days.
– (This script will launch every day and move files 90 days or older from adplacer retail to ??? folder)
on run
–set posixPath1 to “Volumes/Macintosh Hd/Users/me/Desktop/xxx/”
set posixPath1 to “path to source folder on server:”
set Source_files to POSIX file posixPath1 as alias
–set posixPath3 to “Volumes/Macintosh Hd/Users/me/Desktop/yyyy/”
set posixPath3 to “path to destination folder on server:”
set Dest_Files to POSIX file posixPath3 as alias
try
tell application “Finder”
if (items of folder Source_files whose modification date is less than ((get current date) - 180 * days)) exists then
get (items of folder Source_files whose modification date is less than ((get current date) - 180 * days))
move (items of folder Source_files whose modification date is less than ((get current date) - 180 * days)) to folder Dest_Files with replacing
end if
end tell
end try
end run