Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For an office with mostly Windows workstations and a few OS X workstations, what's the easiest way for the Mac users to translate to and from a Windows-style file paths?

For example, to automatically translate \\fileserver01\client-files\client01\comp.psd, if sent in an email, to //fileserver01/client-files/client01/comp.psd?

share|improve this question
up vote 4 down vote accepted

This site has a way to translate into a mac network location and open it:

So you could easily save that as a text service and be able to select a windows network location, right-click it, and have it translated and opened.

I imagine you could sort of reverse the function and translate back into a windows network location string.

Here's how to set up a text service to convert to a Mac path and open it in Finder:

  • Open up Automator
  • Choose "Service"
  • Drag a "Run AppleScript" item from the library into the main area on the right.
  • Copy and paste this AppleScript into it: (it wouldn't properly format in here)
  • Save it under "Convert and Open Windows Path" or whatever you like.
  • Select a path in an application, right-click it, and look for the service you created (it might be under a "Services" sub-menu)

Here's what your Automator service should look like: Automator Service Example

share|improve this answer
This is so close to a great answer. If you brought that AppleScript in to the answer from the reference site and then walked through how to set it up as a service you'd have a stellar answer. – Ian C. Mar 27 '12 at 0:11
@IanC. were you referring to the first or second site? I'll do that. – penguinrob Mar 27 '12 at 0:12
The first site. The MacWorld Hints page. – Ian C. Mar 27 '12 at 0:13
Thanks for the suggestions Ian! Now I've learned how to make text services which I can already think of some uses for. – penguinrob Mar 27 '12 at 0:36

I know this is an old exchange, but it still works. I forked the code to show an example of converting a network drive path to an SMB protocol with a server IP address.

This is helpful if windows users have a lettered network drive such as W:\a\really\tedious\folder\path

Thanks for the original script PenguinRob.

on searchReplace(theText, SearchString, ReplaceString)
    set OldDelims to AppleScript's text item delimiters
    set AppleScript's text item delimiters to SearchString
    set newText to text items of theText
    set AppleScript's text item delimiters to ReplaceString
    set newText to newText as text
    set AppleScript's text item delimiters to OldDelims
    return newText
end searchReplace

on run {input, parameters}

    set myClip to the input
    set mylocation to searchReplace(myClip, "<", "")
    set mylocation to searchReplace(mylocation, ">.", "")
    set mylocation to searchReplace(mylocation, ">", "")
    set mylocation to searchReplace(mylocation, "\\", "/")
    set mylocation to "smb:" & mylocation
    # convert Windows network drive paths to SMB addresses EXAMPLE:
    set mylocation to searchReplace(mylocation, "smb:W:", "smb://")
    # check if the person who gave you the windows link used a lowercase drive letter:
    set mylocation to searchReplace(mylocation, "smb:w:", "smb://")
    # fix issue with spaces
    set mylocation to searchReplace(mylocation, " ", "%20")

    tell application "Finder"
        open location mylocation
    end tell

    # after setting the location, set Finder to topmost, or delete this section if you dont want that.
    tell application "Finder"
    end tell

    return input
end run
share|improve this answer
The url is no longer valid. Does anyone have a copy of that script that they can post? – user148415 Sep 24 '15 at 17:08
A downvote and a request? Awesome. My github account was corrupted and repaired with a new user name, I couldn't possibly recall where all the links to it were. Try: – Radio Sep 24 '15 at 18:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.