Nåt sånt här kanske? Med reservation för att jag inte vet hur scp funkar...
Koden är plockad från AppleScript Guidebook: Essential Sub-Routines och bara lite modifierad.
-- the list of file types which will be processed
-- eg: {"PICT", "JPEG", "TIFF", "GIFf"}
property type_list : {}
-- since file types are optional in Mac OS X,
-- check the name extension if there is no file type
-- NOTE: do not use periods (.) with the items in the name extensions list
-- eg: {"txt", "text", "jpg", "jpeg"}, NOT: {".txt", ".text", ".jpg", ".jpeg"}
property extension_list : {}
global stringOfFiles
-- This droplet processes both files or folders of files dropped onto the applet
on open these_items
set stringOfFiles to ""
repeat with i from 1 to the count of these_items
set this_item to (item i of these_items)
set the item_info to info for this_item
if folder of the item_info is true then
process_folder(this_item)
else if (alias of the item_info is false) and ¬
(((type_list is {}) or (the file type of the item_info is in the type_list)) or ¬
((extension_list is {}) or ¬
(the name extension of the item_info is in the extension_list))) then
process_item(this_item)
end if
end repeat
do shell script "scp " & stringOfFiles & " minerver.se:/backup"
end open
-- this sub-routine processes folders
on process_folder(this_folder)
set these_items to list folder this_folder without invisibles
repeat with i from 1 to the count of these_items
set this_item to alias ((this_folder as text) & (item i of these_items))
set the item_info to info for this_item
if folder of the item_info is true then
process_folder(this_item)
else if (alias of the item_info is false) and ¬
(((type_list is {}) or (the file type of the item_info is in the type_list)) or ¬
((extension_list is {}) or ¬
(the name extension of the item_info is in the extension_list))) then
process_item(this_item)
end if
end repeat
end process_folder
-- this sub-routine processes files
on process_item(this_item)
set this_item_name to POSIX path of this_item
set stringOfFiles to (stringOfFiles & " \"" & this_item_name & "\"")
end process_item