06-11-2009, 17:54
Bueh , esto no es nada pa una grandísima gurú insuperable como yoÂ
Aquí tienes tu script :laugh: :laugh: lo hice en unos segundos :laugh:
property extension_list : {”avi”, “mpg”, “mpeg”, “mv4″}
property done_foldername : “Sistema:Users:nombre de usuario:Movies”
on adding folder items to this_folder after receiving added_items
– Obtenemos la carpeta de peliculas
tell application “Finder”
set the target_folder to folder done_foldername
end tell
try
– Para cada item añadido
repeat with i from 1 to number of items in added_items
set this_item to item i of added_items
set the item_info to the info for this_item
– Comprobamos que sea una pelicula
if (the name extension of the item_info is in the extension_list) then
– Si es una pelicula movemos el fichero a la carpeta de peliculas
tell application “Finder”
set the target_file to (move this_item to the target_folder with replacing)
end tell
end if
end repeat
on error error_message number error_number
if the error_number is not -128 then
tell application “Finder”
activate
display dialog error_message buttons {”Cancel”} default button 1 giving up after 120
end tell
end if
end try
end adding folder items to
=) =)
Quienes presumen de no haber perdido nunca el tiempo no saben lo que se han perdido