Currently Being ModeratedJul 23, 2009 5:34 PM (in response to Bobby Dazzler)Renaming an item inside of the attached folder will trigger the folder action again, the same as adding a new item.
You can move the item out of the attached folder before renaming it. Since folder actions are specific to a folder, you could also keep a folder inside of your attached folder and use that.MacBook Pro, Mac OS X (10.5.7), / G4 Digital Audio, G4 mini [Tiger 10.4.11] / G3 MiniTower [OS 9.2]
Currently Being ModeratedAug 7, 2013 2:48 AM (in response to Bobby Dazzler)
Or you could code a little trap in the script to not process files with a given suffix. Here's one of mine which tests for the suffix "_crtolf"
-- Script to translate CR to LF as a folder action
-- Julian Jordan 06/08/2013
on adding folder items to this_folder after receiving added_items
repeat with i from 1 to number of items in added_items
tell application "Finder"
set this_item to item i of added_items
set the item_info to the info for this_item
set the the_file_name to the name of this_item
set the folder_name to the name of this_folder
set nameExt to name extension of (item i of added_items)
set oldName to text -((count nameExt) + 8) through -((count nameExt) + 2) of (get name of (item i of added_items))
--Don't process new file we've just made - otherwise endless loop
if (oldName ≠ "_crtolf") then
set theUnixPath to POSIX path of (item i of added_items)
set theShellString to "tr '\\r' '\\n' < " & quoted form of (theUnixPath) & " > " & quoted form of (theUnixPath & "_crtolf.txt")
do shell script theShellString
end adding folder items to