Re: How do you force Finder to update changes in a folder
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.