AppleScript: How to create a new Finder window for a folder that is already open?

Simple way to make a New Finder Window to the Desktop.


set myTarget to ((path to desktop) as text)

tell application "Finder" to make new Finder window to folder myTarget

From https://macscripter.net/viewtopic.php?id=36300


I think this code does what you want.

Code:

set targetFolder to POSIX file "/Users/Me/Desktop/MyFolder"

tell application "Finder"
    set finderFolder to item targetFolder
    set lstTargets to target of every Finder window
    if {finderFolder} is in lstTargets then
        set target of (make new Finder window) to targetFolder
    end if
end tell