Applescript Apple脚本:将文件移动到适当的文件夹
我对苹果的脚本相当陌生,我希望能得到一些帮助来完成这个简单但多余的任务 假设我有一个包含这些文件夹的文件夹 贾巴 福 大人物 我想把文件放到这个文件夹中,让它自动按文件名对4个选项中的1个进行排序。 如果文件名包含jabba,则转到jabba文件夹,如果是foo,则转到foo文件夹。。。如果没有,不要做任何事,让它去吧 谢谢 我有OSX 10.7.5试试:Applescript Apple脚本:将文件移动到适当的文件夹,applescript,filenames,move,Applescript,Filenames,Move,我对苹果的脚本相当陌生,我希望能得到一些帮助来完成这个简单但多余的任务 假设我有一个包含这些文件夹的文件夹 贾巴 福 大人物 我想把文件放到这个文件夹中,让它自动按文件名对4个选项中的1个进行排序。 如果文件名包含jabba,则转到jabba文件夹,如果是foo,则转到foo文件夹。。。如果没有,不要做任何事,让它去吧 谢谢 我有OSX 10.7.5试试: on adding folder items to theFolder after receiving theFiles repea
on adding folder items to theFolder after receiving theFiles
repeat with aFile in theFiles
tell application "Finder"
if aFile's name contains "Jabba" then
move aFile to (first folder of theFolder whose name = "Jabba")
else if aFile's name contains "Foo" then
move aFile to (first folder of theFolder whose name = "Foo")
else if aFile's name contains "Biggie" then
move aFile to (first folder of theFolder whose name = "Biggie")
end if
end tell
end repeat
end adding folder items to
尝试: