• 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: How do you force Finder to update changes in a folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you force Finder to update changes in a folder


  • Subject: Re: How do you force Finder to update changes in a folder
  • From: Rob Jorgensen <email@hidden>
  • Date: Wed, 3 Apr 2002 21:20:30 -0500

On 4/3/02, Cornwall commented:

I have an application that frequently overwrites files in its folder. When I use something like the snippet below, the script will error whenever the file is overwritten and renamed.

tell application "Finder"
set fil1 to first file of folder "MacHD:Users:squig:Folder1:Logs:" whose name contains "logfile_"
fil1 as alias returning als1
end tell

But, if I have the Finder open and close the file's enclosing folder when the above (in a try block) errors, then rerun the snippet, all is well.

Is there a less distracting way to get the Finder to update itself, or am I stuck with windows opening and closing all over the place?

There's an update command in the Finder's dictionary.

I've used it successfully on a couple of occasions where the Finder wasn't keeping up with a script.
--

Rob Jorgensen
Ohio, USA
_______________________________________________
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.

  • Follow-Ups:
    • Re: How do you force Finder to update changes in a folder
      • From: Cornwall <email@hidden>
References: 
 >How do you force Finder to update changes in a folder (From: Cornwall <email@hidden>)

  • Prev by Date: Re: Get UNIX path of selected file
  • Next by Date: 'Could not save changes...' error
  • Previous by thread: How do you force Finder to update changes in a folder
  • Next by thread: Re: How do you force Finder to update changes in a folder
  • Index(es):
    • Date
    • Thread