Skip to content

Instantly share code, notes, and snippets.

@martineno
martineno / uncconvert.py
Created September 27, 2012 19:06
UNC to SMB OS X Text Service

I run into UNC paths fairly often and they can be a pain to deal with on OS X. So I wrote a little text service action that helps with this problem.

After you set this up, you will be able to highlight any text in a text field, right click and have the text converted from a UNC path to a smb:// style URL. This is especially helpful when using these in Finder with the Go -> Connect to Server dialog box.

To use this:

  1. Open Automator
  2. Select File -> New
  3. For the document type, choose "Service"
  4. Add the "Run Shell Script" action