Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > applescript folder event.

applescript folder event.
Thread Tools
Fresh-Faced Recruit
Join Date: Jan 2006
Status: Offline
Reply With Quote
Jan 24, 2006, 07:12 PM
 
Hi,

I've build a applescript that execute a workflow every time I add or remove a file in a folder.

Unfortunately it doesn't work when a file within the folder get's modify. Does someone know how an apple script attached to a folder would detect a file modification?
     
Junior Member
Join Date: Mar 2000
Location: Salem, OR, USA
Status: Offline
Reply With Quote
Jan 26, 2006, 12:42 AM
 
Originally Posted by gregypoo
Hi,

I've build a applescript that execute a workflow every time I add or remove a file in a folder.

Unfortunately it doesn't work when a file within the folder get's modify. Does someone know how an apple script attached to a folder would detect a file modification?

Judging from the lack of response to this question I am going to say that everybody else ran into the same dead ends that I did in looking for an easy solution.

The only thing I can come up with is to keep a list of the file names and last modified dates of every file in your folder. Put this in an "on idle" handler. The time between activations will depend on how fast you need the system to react once a file has been changed. Is 30 seconds fast enough? Is one hour fast enough?

The feasibility of this will also depend on how many items you have in this folder. 50 or less -- a piece of cake. 5000 or more -- well that might be a little slow.

I did something like this about 6 years ago. I wanted cetain people to be notified when a new file appeared on our ftp server. I don't think folder actions were around at that time. I can't find the code, but if you need a start on the concept I have listed here just let me know and I'll take a stab at it.

-numero
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:25 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2