FinderWindowSet

FinderFinderWindowSet

Finder Windows Download

Go to Finder and select your user/home folder. With that Finder window as the front window, either select Finder/View/Show View options or go command - J. When the View options opens, check ’Show Library Folder’. That should make your user library folder visible in your user/home folder. The desired AppleScript solution: Here is the desired behavior: If targetFolder already exists in any open Finder window (including any minimized Finder window), I would like the AppleScript to create a new window for the same targetFolder (i.e., a duplicate window).

FinderWindowSet

Download The Finder For Windows

Finder: Use Cmd-N to Create a New Folder or a New Finder Window
New Folder or Window.scpt
(*
This script is for anyone who still has the classic Mac OS era habit of using
Command-N to create a new folder in the Finder. It's intended for use with
Red Sweater Software's excellent FastScripts utility -- a replacement for the
system's build-in Scripts menu that allows for assigning keyboard shortcuts
to scripts, on a per-application basis.
FastScripts: https://red-sweater.com/fastscripts/
Install the script here: ~/Library/Scripts/Applications/Finder/
In FastScripts, assign the script a shortcut of Command-N.
Now, whenever you invoke Command-N in the Finder, you'll get prompted to
choose between creating a new folder or opening a new Finder window. This
sounds like a pain in the ass, but I've been using this script for years, and
however annoying it is to add an extra confirmation step each time I create
a new folder or window, it's far less annoying than getting a new unwanted
window every time I try to create a new folder.
Version 1.1, 16 Mar 2017
- Added a property to remember the previous selection, and default to that the next time you invoke the script.
*)
propertylast_selection : '
tellapplication'Finder'
choose from list {'Folder', 'Window'} default items {last_selection} with title 'New'with prompt 'What:' OK button name'Create'without multiple selections allowed and empty selection allowed
try
set_whattoitem1oftheresult
if _what is'Folder'then
my make_new_folder()
else if _what is'Window'then
my make_new_finder_window()
end if
setlast_selectionto _what
end try
end tell
onmake_new_folder()
tellapplication'System Events'
tell process 'Finder'
click menu item'New Folder'of menu 1of menu bar item'File'of menu bar 1
end tell
end tell
end make_new_folder
onmake_new_finder_window()
tellapplication'System Events'
tell process 'Finder'
click menu item'New Finder Window'of menu 1of menu bar item'File'of menu bar 1
end tell
end tell
-- Could do this:
-- tell application 'Finder' to make new Finder window
-- But that opens at the root. UI scripting lets the Finder give you exactly what New Window gives you from the menu.
end make_new_finder_window
onmake_new_folder_old()
-- Doing it this way doesn't add the New Folder action to the Undo stack
-- And you need UI scripting to get the 'untitled folder' text selected anyway
tellapplication'Finder'
set_locationto folder offront window
set_new_folderto make new folder at _location
setselectionto _new_folder
tellapplication'System Events'
tell process 'Finder'
key code 36-- return
end tell
end tell
end tell
end make_new_folder_old
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Many people would agree that the Finder is a decent, powerful, yet simplistic Folder navigation app. However, I think we all need side by side Finder windows when copying and moving files around. The fact that when a new Finder opens it always overlaps the existing Finder and one has to resize it, move it accordingly, etc., is quite annoying. There are several commercial applications like Path Finder or ForkLift that let you do this dual pane display mode and lots of other things. These tool are OK, but honestly most of the times one just needs another Finder, not having to launch a new application. In addition there are many apps that have the “reveal in Finder” option, so most of the times one ends up using the Finder, instead of launching another app. Furthermore, Path Finder and ForkLift are both expensive if you’re only buying for the dual mode. There is a third option, less expensive but simpler it’s called Total Finder and its main feature is that it enables tab browsing within the original Finder, like in any modern web browser and the “dual mode” as well. However, I do think it’s a bit expensive for being a really simple tool, it costs $18.

Therefore, I googled a bit and developed my own Apple Script for displaying two Finder windows side by side. I must say I was inspired by the post on How To Mac, but I tweaked the code so much it’s actually a new script altogether.

The script is the following. Feel free to copy, modify and redistribute this script any way you like:

FinderWindowSet

One of the good things about this script is that it closes all of the existing Finder windows except the one from which you called the script. On top of that it remains in the same folder you were originally working and launches the second Finder window in the home folder. The script from How To Mac simply created two Finder windows without figuring out if there were any open windows and it didn’t keep the current window open. So fire up the AppleScript Editor and paste the code in it. Save it as an app and place it wherever you want. I have it in a folder in my home directory called Scripts. I named it “DualFinder.app”. After saving the app, drag it to the Finder window toolbar.

FinderWindowSet

I actually changed the icon later to something more interesting.

If you want to change the icon of your script you can do it in the following way. First get an icon file. Findicons.com is a great place to get free icons. Then open the icon file in preview, select all, and copy the image. Afterward, in Finder click the script, press cmd+i, go to the icon, and paste the new one, and you’re good to go.

Update: The other way to change the application icon is by right clicking on the app and selecting Show Package Contents then Contents > Resources and replacing the .icns file. Microsoft office 2011 excel.

Here’s the final result. Hope it makes you be more productive. Cheers!