on adding folder items to this_folder after receiving these_items set DateTime to "_@_" & (do shell script "date "+20%y%m%d-%H%M%S"") as string repeat with aFile in these_items set aFileStr to (aFile as string) set LastItem to last text item of aFileStr set oldDelims to AppleScript's text item delimiters try set AppleScript's text item delimiters to {":"} if LastItem = ":" then set OldName to (text item -2 of aFileStr) else set OldName to last text item of aFileStr end if set AppleScript's text item delimiters to oldDelims on error set AppleScript's text item delimiters to oldDelims end try if not (OldName starts with "_@_") then set NewName to (DateTime & "_" & OldName) as string do shell script "cd ~/.Trash; mv "" & OldName & "" "" & NewName & """ end if end repeat end adding folder items to