Re: Folder Actions technical questions
Re: Folder Actions technical questions
- Subject: Re: Folder Actions technical questions
- From: "Adam Bell" <email@hidden>
- Date: Sun, 2 Apr 2006 09:38:52 -0300
I too have found FAs to be less than reliable for any application except direct drag and drop of a file to the folder or the folder's window. These are both actions that require the Finder's "attention", so they get processed. We've all had the experience of the Finder not noticing activities that didn't require its direct action.
Write a simple FA and move a file to it using a shell script mv command and it might not notice. Same with files FTP'd to it. Occasionally, the FA doesn't fire. Further problems arise if a large collection of files are dropped together on the FA folder. To name just one difficulty, the order in which those files will be processed seems indeterminate. I tend to stick to idle scripts to watch such folders. You obviously cannot change the name of a file that is dropped on the folder unless you do something to prevent the FA from firing again with the now "new" file.
On 4/2/06, Gary Tate <email@hidden> wrote:
Mark
Not sure about others, but I've found folder actions to be less than
reliable, not always triggering.
I had a similar set u, monitoring an ftp folder and ended up having
to write an RB app to monitor it, so I'd be interested if anyone can
shed any light on this.
When it did trigger, the action didn't wait for the file to finish
writing so I put in a loop, checking for file size and when it
stopped growing I assumed it was all there. That worked well. The
script only ran against each file once so that should be OK. Not sure
about the third point, would depend on how the machine running the
script sees to folder. If it changes when the RAID fallsover, then
you;d need to code for that in some way, but I'd assume it stays the
same. Point 4, see the start of this reply. They don't need to be
restarted, but seemed unreliable to me.
Gary
On 2 Apr 2006, at 06:53, Mark Siple wrote:
>
> I'm a longtime scripter but first-time poster. In setting up a few
> folder
> actions to process files on a pair of Xserves running 10.3.5, I
> have a few
> technical questions:
>
> 1. The first folder action will process files that arrive via FTP.
> Will
> System Events test for the file transmission to be complete before
> running
> the attached script or does my script need to do handle that (ie
> loop until
> the file is the same size for x seconds)?
>
> 2. If my script has to test for completeness, do I need to use a
> lock file
> to prevent System Events from running the script against a
> particular file
> more than once?
>
> 3. At least one of these folder actions will be attached to a
> folder on the
> attached Xserv RAID array. When failover of the RAID occurs between
> the
> servers, what needs to be done to have the the new server with the
> RAID run
> the folder action? Is it enough to simply have System Events
> running on both
> servers all the time? If System Events needs to be notified, can it
> be done
> via shell or Applescripting?
>
> 4. Are Folder Actions pretty robust or should I restart them, say,
> once a
> day (during an offtime)?
>
> Thanx. Mark.
>
> -----
>
> Mark Siple <
email@hidden>
> Systems Administrator
> The Columbus Dispatch
>
> "Never ask a man what sort of computer he drives.
> If it's a Mac, he'll tell you.
> If not, why embarrass him?" -- Tom Clancy
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list (Applescript-
>
> 40tgisolutions.co.uk
>
> This email sent to email@hidden
>
-------------------------------------------------------
TGI Solutions LLP
Apple Solution Expert
http://www.tgisolutions.co.uk
Mobile: 07813 214 129
-------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden
This email sent to email@hidden
--
Some minds remain open long enough for a truth to both enter and leave without processing.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden