Open Windows Mapped drive via hyperlink in Mail

Discussion in 'Mac Apps and Mac App Store' started by smilinmonki666, Aug 12, 2011.

  1. smilinmonki666 macrumors regular

    Joined:
    Jan 20, 2008
    #1
    I am on a windows network and get sent a hyperlink to a drive daily, since upgrading to a mac I want to be able to open from the hyperlink but mail does not recognise this as hyperlink.

    Does anyone know how I would get round this? Been looking into SED or AppleScript.

    I am the 1st Mac on a windows network and would like to get it working fully with SMB. I know I can add a drive via 'CTRL'+'K' but would like to just click on the link to go direct to the file.

    Can anyone help?
     
  2. res1233 macrumors 65816

    res1233

    Joined:
    Dec 8, 2008
    Location:
    Brooklyn, NY
    #2
    Would help if we knew what format the URL is using. Generally the windows format is different than what would be recognized by any other OS. Change the URL to this format: "smb://IPAddress/path/to/file". That format is recognized by Mail.

    EDIT: This should be scriptable using AppleScript, which I could do for you as I enjoy this stuff. :) Just ask.
     
  3. smilinmonki666 thread starter macrumors regular

    Joined:
    Jan 20, 2008
    #3
    It's getting 150+ users to change what they do for one mac user across the business.

    When they share the link, its:

    file:///\\Path\to\shared\folder

    This does not work.

    What I was thinking is creating some apple script to parse/change the url text or seeing if there is something to change on windows?

    hope this helps?
     
  4. res1233, Aug 12, 2011
    Last edited: Aug 12, 2011

    res1233 macrumors 65816

    res1233

    Joined:
    Dec 8, 2008
    Location:
    Brooklyn, NY
    #4
    As I figured, windows uses the \\path\to\file format for SMB shares, while most other OSes use smb://. You should be able to parse this URL and change it into the proper format. Since I don't have anything better to do, I'll look into it.

    It can definitely be done with Applescript. You have to assign a script to a rule in mail. You may have to have the script send a modified message to yourself since editing messages doesn't seem to be too easy. I could set this up, but I'd need some insight into the entire format of the message for parsing.
     
  5. res1233, Aug 12, 2011
    Last edited: Aug 12, 2011

    res1233 macrumors 65816

    res1233

    Joined:
    Dec 8, 2008
    Location:
    Brooklyn, NY
    #6
    Wow, I did not know about that. Silly me, I always take the long complicated route. :p

    EDIT: Uhm. I did it! Install this service into your Services folder within the Library folder in your home folder (It's invisible in Lion, so use the "Go to folder" option and type "~/Library/Services"). Move the attached workflow there, and from now on, select "\\Path\to\shared\folder" part of the URL you receive, go into the "Services" menu under the application's menu ("Mail" menu in Mail), select the newly installed service, and it'll mount the drive for you. God I love macs. Windows users truly have no idea what they're missing. ;) This will actually convert any URL to SMB, just make sure you select after the protocol part like "AFP:" "FTP:" etc.

    You can assign a shortcut to this service then in the Keyboard preferences.
     

    Attached Files:

  6. smilinmonki666 thread starter macrumors regular

    Joined:
    Jan 20, 2008
    #7
    Hi res1233 & Tutorer,

    Thank you for your suggestions, I will look into these as soon as I get chance...
     

Share This Page