Ações de pasta .scpt não está funcionando

0

Estou tentando usar esse script com ações de pasta. Eu testei a funcionalidade dentro de ações de pasta, ativando um script padrão, ele funciona. Mas este roteiro não parece funcionar?

on adding folder items to this_folder after receiving added_items
    tell application "Finder"
        repeat with aFile in added_items
            if the name extension of aFile is "mp3" then
                move aFile to Muisc
            end if
            if the name extension of aFile is "mkv" then
                move aFile to Movies
            end if
        end repeat
    end tell
end adding folder items to
    
por David Custer 16.10.2013 / 15:04

1 resposta

1

Tente:

on adding folder items to this_folder after receiving added_items
    tell application "System Events"
        repeat with aFile in added_items
            if the name extension of aFile is "mp3" then
                move aFile to "/Users/davidcuster/Music"
            else if the name extension of aFile is "mkv" then
                move aFile to "/Users/davidcuster/Movies"
            end if
        end repeat
    end tell
end adding folder items to

Além disso:

"/ Users / davidcuster / Music" = (caminho para a pasta de músicas)

"/ Users / davidcuster / Movies" = (caminho para a pasta de filmes)

  on adding folder items to this_folder after receiving added_items
    tell application "System Events"
        repeat with aFile in added_items
            if the name extension of aFile is "mp3" then
                move aFile to path to music folder
            else if the name extension of aFile is "mkv" then
                move aFile to path to movies folder
            end if
        end repeat
    end tell
end adding folder items to
    
por 16.10.2013 / 15:17