2011-12-04 35 views

回答

1

運行這Applescript Editor

set myFolder to choose folder 
tell application "Finder" 
set folderContents to the entire contents of myFolder 
end tell 
set folderItems to the number of items in folderContents 
set x to 1 
repeat 
    set myFile to (item x of folderContents) 
    set theFileName to myFile as text 
    if (text ((offset of "." in theFileName) + 1) thru -1 of theFileName) is equal to "partial" then 
     return 
    end if 
    if x is equal to folderItems then exit repeat 
    set x to (x + 1) 
end repeat 
tell application "Finder" 
    set y to 1 
    repeat 
     set greenRepeat to item y of folderContents 
     set label index of greenRepeat to 6 --green 
     if y is equal to folderItems then exit repeat 
     set y to (y + 1) 
    end repeat 
end tell 

這個腳本會告訴你要選擇一個文件夾。然後它將遍歷該文件夾中的所有文件,並且如果它找不到類型爲.partial的文件,則會將該文件夾中的所有文件變爲綠色。

相關問題