Re: Folder action on server
Re: Folder action on server
- Subject: Re: Folder action on server
- From: Larry McMunn <email@hidden>
- Date: Thu, 22 Jan 2004 07:43:54 -0500
>
Subject: Folder action on server
>
Date: Wed, 21 Jan 2004 11:59:09 -0500
>
From: "Steve Suranie" <email@hidden>
>
To: <email@hidden>
>
>
Is there anyway in OS X to have a folder action on a folder that sits on a server?
Steve,
I have been setting up a series of network text processing folders. The "server" is an iMac with 10.3.2. Employees simply drop their files in the correct "In" folder. The following Folder Action script is attached to several folders. If it finds a new file in the watched folder, it runs a script in a folder named "Processor". This approach lets one script watch several folders and start unique procedures for each watched folder. It can be modified quickly to run more that one script if needed.
-------------------------------------
on adding folder items to this_folder after receiving added_items
try
tell application "Finder"
set the folder_name to the name of this_folder --get name of folder
end tell
set workLocation to this_folder as string
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {":"}
set workLocation to text items of workLocation as list
set workLocation to delete item -1 from workLocation
set workLocation to ((delete item -1 from workLocation) as string) & ":"
set AppleScript's text item delimiters to oldDelims
set script_To_Run to (workLocation & "Processor:")
set theScript to item 1 of (list folder script_To_Run without invisibles) as string
activate
display dialog "Processing "In" Folder" giving up after 2 --optional
launch application theScript
run application theScript
end try
end adding folder items to
------------------------------------
--
Happy Automation! :-)
Larry McMunn
President
McMunn Associates, Inc.
Specialists in automated Data Visualization through Apple products
Collingswood, NJ
(856) 858-3440
---------------------------------------------------------------
_______________________________________________
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.