2014-10-02 48 views

回答

1

您需要編寫腳本。下面是一些似乎在applescript編輯器中工作的代碼。針對自動設備進行相應的調整...

set iFolder to (choose folder) 

set iFiles to (list folder iFolder) 

tell application "iPhoto" 
    repeat with iFile in iFiles 
     try 
      set pFound to get (every photo of album "Photos" whose image filename is iFile) 
     end try 
     if length of pFound is not 0 then 
      log ("File '" & iFile as text) & "' exists..." 

      # Move or delete it here 
     end if 
    end repeat 

    # Continue with import 
    import from (iFolder as alias) 
end tell 
+0

這似乎假設只有重名的圖像具有相同的名稱,並且所有具有相同名稱的照片都是重複的。由於這兩種假設都會失敗,所以如何真正判斷是否有重複? (iPhoto如何從UI中獲取它已經導入的圖像?) – Michael 2017-04-23 15:05:48

+0

'執行錯誤:未定義變量pFound。' – Michael 2017-04-30 16:30:17

+0

'210:215:腳本錯誤:期望的類名稱,但找到標識符。 (-2741)' – Michael 2017-04-30 16:49:28