I'm making a simple folder action that will Open files placed into it.
(I'll be using this in a dropbox folder eventually).
My code works as is, but I would like to limit it to only activating files with certain file extensions (The commented out lines).
I've tried variations I've found online, using "Name", using a list and comparing it to that, but I think I'm missing something fundamental
.
(I'll be using this in a dropbox folder eventually).
My code works as is, but I would like to limit it to only activating files with certain file extensions (The commented out lines).
I've tried variations I've found online, using "Name", using a list and comparing it to that, but I think I'm missing something fundamental
.
Code:
on adding folder items to this_folder after receiving these_items
repeat with i from 1 to number of items in these_items
set this_item to item i of these_items as alias
if this_item is not ".DS_Store" then
--if name extension of this_item is "txt" then
tell application "Finder" to open this_item
--end if
end if
end repeat
end adding folder items to