Is there a way to set ForkLift as the default file viewer, to a degree? PathFinder somehow does this, see http://cocoatech.com/faqs#3, but how does it do this and could that option be set to redirect to ForkLift instead of PathFinder?


Path Finder looks like it's modifying the "NSFileViewer" preference. You can set this manually from Terminal to point to ForkLift (I tried this, and it seems to work):

defaults write -g NSFileViewer -string com.binarynights.ForkLift2

(The -g sets this preference globally for all applications.)

However, be warned that the Path Finder website lists some applications that don't respect this setting, such as the Dock and Firefox.

  • The -g flag is equivalent to NSGlobalDomain. It simply writes the preference to the global domain, rather than to a specific domain. – Mathias Bynens Mar 25 '12 at 8:43
  • Very interesting, thanks! Seems to work well for the applications that do support it! – penguinrob Mar 26 '12 at 12:19
  • how do I revert to using Finder? – john2x Jun 15 '12 at 8:51
  • 2
    Try defaults delete -g NSFileViewer. – jtbandes Jun 16 '12 at 2:33
  • 5
    For ForkLift 3, the command is defaults write -g NSFileViewer -string com.binarynights.ForkLift-3 – Matt Stow Feb 25 '17 at 12:35

Now as the ForkLift V3 came out, the new command should be:

defaults write -g NSFileViewer -string com.binarynights.ForkLift-3

At the same time, if you like to restore Finder to be the default file manager again, use:

defaults delete -g NSFileViewer

From Forklift official documentation:

If you are using ForkLift from Setapp, paste this command instead:

defaults write -g NSFileViewer -string com.binarynights.forklift-setapp;
defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add '{LSHandlerContentType="public.folder";LSHandlerRoleAll="com.binarynights.ForkLift-3";}'

You can change default file manager like this, but ForkLift or Transmit not work as expected, only Path Finder are


from LaunchServices import LSSetDefaultRoleHandlerForContentType, kLSRolesViewer, LSSetDefaultHandlerForURLScheme
from CoreFoundation import CFPreferencesCopyApplicationList, kCFPreferencesCurrentUser, kCFPreferencesAnyHost, CFPreferencesSetAppValue, CFPreferencesAppSynchronize

applicationBundleIdentifier = "com.cocoatech.PathFinder" #"com.panic.Transmit" #"com.binarynights.forklift2"

LSSetDefaultRoleHandlerForContentType("public.folder", kLSRolesViewer, applicationBundleIdentifier)
LSSetDefaultHandlerForURLScheme("file:///", applicationBundleIdentifier)

applicationIDs = CFPreferencesCopyApplicationList(kCFPreferencesCurrentUser, kCFPreferencesAnyHost)
for app_id in applicationIDs:
    CFPreferencesSetAppValue("NSFileViewer", applicationBundleIdentifier, app_id);

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .