Created
July 13, 2013 10:47
-
-
Save jamesstout/5990309 to your computer and use it in GitHub Desktop.
AppleScript to close all Finder Get Info windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Finder" | |
set theWindowList to windows (* get all Finder windows *) | |
repeat with i from 1 to number of items in theWindowList (* loop through them *) | |
set this_item to item i of theWindowList (* get a window from the *) | |
set windowName to name of this_item (* get the window's name*) | |
if windowName ends with " Info" then (* see if the window name ends in " Info" - NOTE the space *) | |
close this_item (* ENHANCEMENT: Would also close a Finder window that had a folder open that ended in " Info" *) | |
end if | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment