Configure SFL Files in El Capitan via command-line

For my users I was looking for an easy way to configure the favorite network shares in Finder – Go – Connect to Server.

I found out that those favorites are located in “~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.FavoriteServers.sfl”

There is also the sfl file for the finder sidebar items “com.apple.LSSharedFileList.FavoriteItems.sfl”

Now how do we configure a favorite item in the sidebar or a favorite network share?

In /usr/bin/ is a command line tool named “sfltool”

For adding a network share:


/usr/bin/sfltool add-item -n "Displayname" com.apple.LSSharedFileList.FavoriteServers "Serverpath"

For adding a Sidebar Item (path to a local folder):

 /usr/bin/sfltool add-item com.apple.LSSharedFileList.FavoriteItems file:///Users/$USER/Desktop/ 
Bookmark the permalink.

7 Responses to Configure SFL Files in El Capitan via command-line

  1. simon says:

    Great find (even better coming from a fellow Swiss 😉 And astonishing that the web is so empty on this subject.

    I get errors when adding FavoriteServers with a space in the smb:// serverpath.

    Anyone know of this, and how to work around it?

    • Jim says:

      For an smb path you need to use the path and directory that’s created in /Volumes when mounted.

    • Jim says:

      Ok, so I misread what was stated…my original post is below which was incorrect for what was mentioned. I do use the /Volume file path to place a folder shortcut in the favorites list. Works good. I was using a program called mysides to do this but am now thinking of using sfltool.

      For an smb path you need to use the path and directory that’s created in /Volumes when mounted.

  2. Jay says:

    Thank you for your response! I really appreciate it!

    Did you execute the command with double quotes?

    And by the way, why do you want a space in your server path?

  3. Dave says:

    Seems you can add, but not remove! Not a mention on developer.apple.com either…..

  4. Kev says:

    Thank you so much for sharing this knowledge. Exactly what I needed.

    Greetings from a Mac sysadmin @BezBaden 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *