• 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: Delete me...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delete me...


  • Subject: Re: Delete me...
  • From: Emmanuel <email@hidden>
  • Date: Mon, 9 Jun 2003 19:31:09 +0200

At 5:37 PM +0200 09/06/03, EBI Aktivitet wrote:
> >> Having trouble with the simplest script...
>>>
>>> tell application "Finder"
>>>
>>> delete file "Path to the file to delete"
>>>
>>> end tell
>>>
>>> This will work well, just to suddenly stop working. Finder will pop up a
>>> dialog, informing that it's preparing to move the file to trash, and give me
>>> an error code of 2.
>>>
>>> The file to delete always has the same name and path. I've noticed that some
>>> properties of the file seem locked as well. Like trying to set the files
>>> name for example. This strange behaviour then vanishes without warning, and
>>> all works well, deleting, renaming, etc.
>>>
>>> What could possibly be going on?
>>
>> Did you try to have Finder "update" the file before addressing it?
>
>
>Hmm... Update... Would that be like doing something unprovocative, like
>"Exists", "get name" etc? Enlighten me, please!

Unprovocative, I don't know ... What I'm sure is, "update" updates something: for instance "update" forces the update of sizes and modification dates. It would not be too surprising that things be locked in some sense once a file was changed and the Finder did not update the info about it. Still, I don't know, I just guess.

Did you try that?

Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Delete me... (From: EBI Aktivitet <email@hidden>)

  • Prev by Date: Creating folder with user defined icon?
  • Next by Date: Date math question
  • Previous by thread: Re: Delete me...
  • Next by thread: QuickTime Player records this but won't play it
  • Index(es):
    • Date
    • Thread