Applescript to Close Duplicate Finder windows

Close Duplicate finder windows

Macosxhints Posted  a Applescript  hint on Macosxhints to close duplicate finder windows.

The idea of the script is sometimes you may find you have multiple finder windows open. Many of them leading to the same target (folder). And want a quick way of closing all the duplicate windows.

But I couldn’t understand why it was so long and complicated. So as an excise for myself wrote one that did a similar job


The complexity of the script I think comes from the Poster trying to compare open windows by name and creating two lists and then comparing them.

Update. ( The poster has explained that the complexity is in fact due to their script only closing windows in the current space and to trying to get the most speed when the script runs.

Continue reading “Applescript to Close Duplicate Finder windows”