What is the Mac equivalent of the file:// URL?

10

6

I want to look at some options that will help to manage the size of an Exchange mailbox. There are lots of utilities out there that will extract an attachment from an email and replace it with a file:// URL link.

Now comes the wrinkle - the file:// URL works great on Windows - what is the equivalent on the Mac?

Steve French

Posted 2010-02-05T21:58:24.160

Reputation: 101

2

See also: What is the reason that file URLs start with three slashes?

– Cole Johnson – 2014-05-25T00:25:09.043

Answers

9

Try using file:///URL

You need the extra forward slash to signify the root directory of the drive.

John T

Posted 2010-02-05T21:58:24.160

Reputation: 149 037

Thanks John

One other thing to mention: the file will be located on a Windows server, e.g.

\\server\user\email\attachment1.pdf
 – Steve French  – 2010-02-05T22:02:13.513

To access a share, you can use file://///server/user/email/attachment1.pdf (simply append the UNC to file:/// and flip the backslashes), although this does not work from a webpage: https://bugzilla.mozilla.org/show_bug.cgi?id=62851

– John T – 2010-02-05T22:05:27.360

The third slash does not refer to the root directory. Otherwise,, it would not be possible to specify relative paths. The third slash separates the (empty) host name from the actual path. What follows it is OS-dependent. You will need another, fourth, slash, or backslash, to refer to root. – Douba – 2017-11-02T15:46:42.673

@JohnT What about the file( /Users/john/filename.crt ) located on local mac OS, would it be file:///Users/john/filename.crt ?? – Learner – 2018-02-14T19:24:56.817

5

Try using this syntax

smb://FILE PATH

Ben Pilbrow

Posted 2010-02-05T21:58:24.160

Reputation: 283

0

The following two outgoing email syntaxes should work for Mac recipients, even when the path or filename contains spaces.

\hostname\full%20path%20to%20file

or

smb://hostname/full%20path%20to%20file

Mac Mail will not convert the text into a blue link until after your message is sent. Remmeber to replace each space with %20 .

For sending to Windows recipients, this works:

<\hostname\full path to file>

But I have not found a single syntax that works for both kinds of recipients.

Randy

Posted 2010-02-05T21:58:24.160

Reputation: 111