• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleScript to erase one mounted volume if it's modification date is date is greater than one day?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Kaydell Leavitt <email@hidden>
  • Date: Sat, 22 Jun 2013 03:25:02 -0600

Phil,

Hmmm.  I thought that I had it this time.  

My scripts do work for the disk image that I created.  Its modification date does get updated by the Finder
and I can get and set the modification date with my AppleScripts.

Also, I made a new partition on my disk and my scripts work with that too.  I was also able to
test actually erasing a volume now that I have an expendable volume.

That reminds me, I originally had a really bad feeling about writing a script
that can erase a volume.

Anyways, I tried to get the modification date of another volume which has data that
I need to keep safe, but I tried getting the modification date and it seems that
the Finder isn't updating this volume's modification date.

This is just puzzling to me.

Thus, I think we need to find a way to get the modified date of the last file to be written to or the user risks possibly losing data.

I think that you do definitely have a point here.

As long as we're changing the specification, I've been thinking that a better
thing to do than what the original poster asked to have done
would be to have some sort of software that would allow a volume
to accumulate files and folders until the volume started to get full
and would run as a daemon, checking every so often, and when
the volume was starting to get full, this daemon would erase
the oldest files.

What do you think about this idea?

-- Kaydell

On Jun 22, 2013, at 1:39 AM, 2551 <2551phil@gmail.com> wrote:

That’s great work, Kaydell. I find that both System Events and Finder produce the same time.

However, I’m not sure what property ‘modification date’ of the disk is reporting, but on my machine it’s not accurate. Running

tell application "Finder" to get the modification date of the startup disk

reports that the disk was last modified yesterday at 12:04. That’s over 25 hours wrong, as the linked screenshot shows (that search was done before I ran the AppleScript).

https://www.dropbox.com/s/mpztitvbcnqj3ho/lastmodified.png


Thus, I think we need to find a way to get the modified date of the last file to be written to or the user risks possibly losing data.



Phil
http://applehelpwriter.com
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
  • Follow-Ups:
    • Re: AppleScript to erase one mounted volume if it's modification date is date is greater than one day?
      • From: 2551 <email@hidden>
    • Re: AppleScript to erase one mounted volume if it's modification date is date is greater than one day?
      • From: Brian Christmas <email@hidden>
References: 
 >AppleScript to erase one mounted volume if it's modification date is date is greater than one day? (From: Jim Kessler <email@hidden>)
 >Re: AppleScript to erase one mounted volume if it's modification date is date is greater than one day? (From: Kaydell Leavitt <email@hidden>)
 >Re: AppleScript to erase one mounted volume if it's modification date is date is greater than one day? (From: "koenig.yvan" <email@hidden>)
 >Re: AppleScript to erase one mounted volume if it's modification date is date is greater than one day? (From: 2551 <email@hidden>)
 >Re: AppleScript to erase one mounted volume if it's modification date is date is greater than one day? (From: Kaydell Leavitt <email@hidden>)
 >Re: AppleScript to erase one mounted volume if it's modification date is date is greater than one day? (From: 2551 <email@hidden>)

  • Prev by Date: Re: AppleScript to erase one mounted volume if it's modification date is date is greater than one day?
  • Next by Date: Re: AppleScript to erase one mounted volume if it's modification date is date is greater than one day?
  • Previous by thread: Re: AppleScript to erase one mounted volume if it's modification date is date is greater than one day?
  • Next by thread: Re: AppleScript to erase one mounted volume if it's modification date is date is greater than one day?
  • Index(es):
    • Date
    • Thread