1
我添加到iTunes中的腳本文件,試圖添加不支持的類型,如JPG/TXT文件的/ .thumb等AppleScript的選擇一定的延伸
我想成爲一個更具體一點與下面的代碼,只有選擇MP3 & M4A
tell application "Finder" to set fPaths to paragraphs of ((files of entire contents of iTunesFolder) as Unicode text)
repeat with thisFilePath in fPaths
--processing code goes here
-- maybe I need an if file extension is in... type condition?
end repeat
謝謝你的工作,但我認爲thisFilePath始終是unicode文本字符串,所以沒有擴展屬性。我想我需要編寫一個解析函數來獲取擴展名,或者讓「tell application」Finder將fPaths設置爲((作爲Unicode文本的整個內容的文件)的段落)「返回文件對象列表,而不是一個文本數組/段落 – 2010-10-05 07:35:07