2013-02-27 3 views
1

저는 Apple Script를 처음 접했고 간단하지만 과도한 작업을하는 데 도움이되기를 바랍니다.Apple Script : 파일을 적절한 폴더로 이동

내가

비기

이 폴더

자바 더 푸 이있는 폴더를 가지고 있고이 폴더에있는 파일을 삭제하려면, 그것은 자동으로 바로 파일로 분류 한 4 가지 옵션이 있습니다 말할 수 있습니다 이름. 파일 이름에 jabba가 포함되어 있으면 Jabba 폴더로 이동하고, foo 폴더가 있으면 Foo 폴더로 이동하고, 없으면 아무 것도하지 마십시오.

감사

내가 10.7.5

답변

1

시도 OSX 있습니다

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 
관련 문제