Open dual side-by-side finder with applescript

…and save as an app on your desktop!

create an app with applescript to open two finders side-by-side in a few minutes!

I use both a Mac and Windows machine and if I may compare the two, I would say one of them is my feel-good-machine and the other a workhorse to develop .NET stuff on. Both OSses have file managers which work great for finding and opening files but when you copy, move and view files all the time, doing that in the windows explorer or the Mac Finder soon becomes a click fest.

TotalCommander

On my windows machines I use the brilliant Total Commander which was very accurately described by someone as: “Using windows without Total Commander is like driving without my glasses”. It’s true. This thing can do anything from file management to comparing files and from FTP to batch copy.

Back to the Finder

When I bought my Mac I searched for Total Commander alternatives and while some of them work OK, they are not perfect. So while I wait and hope one day Christian Ghistler will re-write Total Commander for the Mac, I’m just going to use the Finder. But to copy and move files, I really need to have side by side Finders. Of course you can open two Finders but why not have an AppleScript do that for me? I googled, found this one to start from and made some changes like determining the screen size automatically and place the finders side-by-side around the center of the screen.

AppleScript to open two Finders side-by-side

STEP1: Fire up the AppleScript Editor and paste this code in it:

-- Feel free to copy, modify and redistribute this script any way you like
-- Be careful to run this "AS IS" script on your machine. I've
-- tested it and it works on my iMac but if you don't know what you're doing,
-- you could end up hurting your beloved Mac and the data on it.
-- Cheers, Loek

-- This script opens two finder windows side-by-side
property finderWidth : 900 -- MUST BE SMALLER THEN HALF OF THE ACTUAL SCREEN SIZE!
property finderHeight : 700

tell application "Finder"
	set screenBounds to bounds of window of desktop
	set screenWidth to item 3 of screenBounds
	set screenHeight to item 4 of screenBounds
	set centerX to screenWidth / 2
	set centerY to screenHeight / 2
	activate
	set visible of (every process whose visible is true and frontmost is false) to false
	set finder1 to make new Finder window
	set the bounds of finder1 to {centerX - finderWidth div 1, centerY - (finderHeight / 2) div 1, centerX - 2 div 1, centerY + (finderHeight / 2) div 1}
	set the current view of finder1 to column view
	set finder2 to make new Finder window
	set the bounds of finder2 to {centerX + 2, centerY - (finderHeight / 2) div 1, centerX + finderWidth, centerY + (finderHeight / 2) div 1}
	set the current view of finder2 to column view
end tell

STEP2: Set a correct value for the finderWidth and finderHeight and if you run the script, two Finders should open. If not, make sure the finderWidth is less then half of the actual screen width.

STEP3: Save as app

In the AppleScriptEditer goto File | Save As…

Type a name and choose Application as File Format

Open the DualFinder.app et voila! Two Finders side by side!

6 thoughts on “Open dual side-by-side finder with applescript

  1. Loek’s script is a perfect solution for something thousands of Photographers and media people do every day. I wonder why this was not key command in the system 10-15 years ago.

  2. You described my year long frustration with OSX finder perfectly. TotalCMD should be built into osx and even windows.

    This evening I did exactly what you did. Created (or borrowed) an applescript which opens two finder windows side-by-side. I usually have two finder like this on a dedicated desktop, but scripting allows me to open specific source and target folders also, which is a nice shortcut to simulate something like CTRL-D option from TotalCMD.

    If only you could resize the column widths to show the full lengths of the files and folder names!

Comments are closed.