Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Securely empty trash via AppleScript after 'n' days' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Securely empty trash via AppleScript after 'n' days
Authored by: Brock Lee on Feb 09, '09 11:07:34AM

I don't believe this script works as described.

The script uses the date/time of the last modification to the file to determine whether it qualifies for deletion. The script does not use the date/time when the file was thrown away (i.e., put in the trash) to determine whether it qualifies for deletion.

Putting something in the trash does not alter the modification date/time.

So you could put something in the trash and find it permanently gone if it's been a while since you modified it.

I don't know AppleScript but I do know UNIX. Perhaps the modification time works differently under AppleScript. So, can anyone verify or challenge my claim?

[ Reply to This | # ]

Securely empty trash via AppleScript after 'n' days
Authored by: Stef@nK on Feb 09, '09 11:34:52AM
The UNIX touch command changes the modification date to the current date

[ Reply to This | # ]
Securely empty trash via AppleScript after 'n' days
Authored by: Brock Lee on Feb 10, '09 03:56:46PM
Thanks! I overlooked that it was touching the files as they went in.

[ Reply to This | # ]