Re: AppleScript to erase one mounted volume if it's modification date is date is greater than one day?
Re: AppleScript to erase one mounted volume if it's modification date is date is greater than one day?
- Subject: Re: AppleScript to erase one mounted volume if it's modification date is date is greater than one day?
- From: 2551 <email@hidden>
- Date: Sat, 22 Jun 2013 17:40:55 +0700
Using
stat -f "%m%t%Sm %N" /Volumes/Temporary\ Drive/tmp/* | sort -rn | head -1
returns the last file to be modified and its date. That looks like an ideal candidate to go in Kaydell's script to compare against the current time.
:)
Best
Phil http://applehelpwriter.com
On 21 Jun 2013, at 03:22, Jim Kessler <email@hidden> wrote:
Here's the scenario: a Mac with a hard drive is partitioned into two volumes, one of which is the startup drive (Macintosh HD). The second volume (Temporary Drive) holds data files which are non-critical. I'd like to compose an AppleScript that compares (running at startup, through a login item) the current date to the modification date of the second volume, and erases the second volume if the modification date is more than a day (or 24 hours, or whatever measure of time necessary) older than the current date. Is this easily accomplished through AppleScript? (Running 10.8.4.)
Thanks! Jim
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden