How can I link to folders on company shared drive?
Asked by Randy Hansford:

I am setting up our confluence page and I would like to be able to link directly to folders on our shared drive, I have been searching the net for answers for 2 days with no success, in a windows environment idealy I would like for it to open up in an explorer window even if I am using chrome/firefox/opera/ie any help would be greatly appreciated.


Answers:
author: Davin Studer
body: To link to a shared folder you use this format. Keep in mind this will **ONLY** work with Internet Explorer by default as it is the only browser that supports the file protocol out of the box. You can get extensions for Chrome and Firefox that will enable the file protocol ... sorta.

```
file://///server/path/to/document.doc
```

Yes, you need five slashes at the front. The protocol is "file:///" ... with three(not two)slashes. The next two slashes are the beginning of the UNC path.

**Firefox extension**   
<https://addons.mozilla.org/en-US/firefox/addon/noscript/?src=search>  
(In the extension options on the Advanced tab-\>Trusted tab -\>Allow local links[](https://addons.mozilla.org/en-US/firefox/addon/noscript/?src=search)

**Chrome Extension**   
<https://chrome.google.com/webstore/detail/locallinks/fkkidcgelfcjmebocoaicnelkbnpgpmm>

comments: author: Amir Vegdani
body: Hi Davin, How do I manage folders which has space in it. I am unable to link the file saved in a folder which has space in its name.


author: Davin Studer
body: Replace spaces with %20


author: Amy Vochatzer
body: David - I can't tell you how happy I was to find your answer here. In other questions out here asking the same question, the response is that you can't link to a network drive, and you can only link if it's an actual URL. I've been playing with this for three days to get this to work for me. I'd been given the info on the %20 for spaces, but still couldn't get it to link until I found your response here indicating that you need the FIVE slashes after "file:". I finally got it to work! Thank you - this will save a ton of time for all the people I need to direct to a network drive folder, for them to update weekly stats in a spreadsheet that gets renamed each week with a new date.


author: Patty J Chan
body: Hi Amy - so do you still need to replace spaces with the %20?

I basically put for example:

file://///{IPAddress}/Ecommerce/PJC/FilesForConfluence%20/JonStats/Analytics%20Cult%20Beauty%20Magento%20Location%2020170101-20170123%2020160101-20160123%20(1).pdf

and it doesn't work. Look forward to hearing your reply. Thanks!


author: Susan Becker
body: Hi, we have a network folder where on-site associates save shared (working) files but need the ability for associates that are off-site to access the same files when they may not necessarily have the ability to log in to the VPN to access. Will the above solution allow anyone to access the linked file even if they can't access the shared drive/network folder at that point in time? Ie can someone log in to confluence on a phone and acces the file?


author: Davin Studer
body: Nope. The file:/// protocol requires being on the same network. If they were VPN'd into your network then potentially it could work. Outside of that it wouldn't work.


author: Efreelen Castro
body: Hi, for some reasons, I am only able to link to our share using MAC protocol. link starts with SMB. But is unable to set it using windows (link starts with file://///). Can someone help please?


author: Jerry Wang
body: Hi

And Do you know if it is possible to place a link to ERP System?

Thank you very much!

Best,

Jerry

comments: author: Davin Studer
body: If your ERP system is web based then sure. You would just use the URL in your browser's location bar for the link url.


author: Jerry Wang
body: Hi Davin,

I had the same question. One thing I didn't understand.

The matrix is

```
file://///server/path/to/document.doc
```

my file is e.g. U:\\Myfolder

How can I place a link in confluence to my file?

Thank you in advance

Best,

Jerry

comments: author: Davin Studer
body: Unless every machine in your organization maps a U drive to the same server share it won't work ... it would work for you, but no one else.


author: Michael Taylor
body: Davin, assume everyone maps to the same drive as ours does. Can you (or anyone) define it in the proper syntax?

At my company everyone has the main server mapped as L:. I have tried varying the string in a multitude of ways on IE and thus far have not had success in getting it to open. below is the example of links I have tried

\[file://///server%20(//mycompany.com/shares)/(L:)/Unit%20Team%20(Unit%20Part)%20Folders/(3)%20Diff/50%20-%20WATCH%20DOG/CPM%20Daily%20Schedule.xlsm\]

I have tried it with 2, 3 and 5 forward slashes, with and without parenthesis on the L:, as well as without the mapped drive designation.

Server Name as per windows file explorer  
**server (\\\\mycompany.com\\shares)**

Mapped Drive

**L:**

File Path per windows file explorer

**Unit Team (Unit Part) Folders\\(3) Diff\\50 - WATCH DOG**

File Name

**CPM Daily Schedule.xlsm**

With 2 and 5 forward slashes I error of file not being found, 3 forward slashes nothing happens at all.

**res://ieframe.dll/dnserror.htm#file://server%20(//mycompany.com/shares)/(L:)/Unit%20Team%20(Unit%20Part)%20Folders/(3)%20Diff/50%20-%20WATCH%20DOG/CPM%20Daily%20Schedule.xlsm**

Using IE 11.0.9600.19301


author: Davin Studer
body: It would look like this.

```
file:///L:/Unit Team (Unit Part) Folders/(3) Diff/50 - WATCH DOG/CPM Daily Schedule.xlsm
```


author: Michael Taylor
body: Thanks for this, Davin.

What is odd was the first time I input the syntax it did not work. I have found that Confluence becomes somewhat unstable at times in IE, which is why I prefer Chrome.

These are the instructions I used for my group.

Confluence uses standard [Unix separator](https://www.howtogeek.com/181774/why-windows-uses-backslashes-and-everything-else-uses-forward-slashes/) of forward slash where Windows DOS chose to use a back slash as it's switch.

To link a server file there are a few rules that need to be followed for everyone to have access:

* The drive must be mapped to the same drive for all users who wish to access the file.
* The separator for the path needs to be change from a backward slash (\\) to a forward slash (/)
* **The file can only be opened with Internet Explorer**. Chrome won't work due to security where a remote host can access files on your computer without your knowledge.

For this job aid we will want to link:

L:\\Fab Team (Unit Part) Folders\\(3) Diffusion\\50 - WATCH DOG\\Members\\Michael Taylor\\Confluence Stuff\\this is a test.xlsx

The end result to get the link to work in Confluence would be:

\[file:///L:/Fab Team (Unit Part) Folders/(3) Diffusion/50 - WATCH DOG/Members/Michael Taylor/Confluence Stuff/This is a test.xlsx\]

This can be done in a few ways, including manually typing it. The easiest way I find is using Excel (other office products work as well, I just find Excel easiest).

1. Open the document from you server file
2. Open the FILE tab  
   Beneath the Info the file path is listed. Left-click on it and select: ++C++opy link to clipboard
3. Paste it into an excel file on a new sheet. It will paste as W for the back slash and %20 as spaces, this is not an issue. It will paste as below

   file:///L:\\Fab%20Team%20(Unit%20Part)%20Folders\\(3)%20Diffusion\\50%20-%20WATCH%20DOG\\Members\\Michael%20Taylor\\Confluence%20Stuff\\This%20is%20a%20test.xlsx
4. Open find and replace window (ctrl-F)
5. Input back slash \\ in 'Find what' box, and forward slash / in the 'Replace with' box. Select 'Replace All' button
6. \* Optional - you can also find and replace %20 with a blank space. Make sure to hit the space bar in the ' Replace with' window.
7. Copy your cell from the formula bar. If you copy from the cell itself the formatting will overwrite when you paste to your page.
8. Go to your Confluence page you are creating or editing. Enter a left bracket \[ paste your link and close with the right bracket \].

Depending on if you replaced the space or not you should wind up with

file:///L:/Fab%20Team%20(Unit%20Part)%20Folders/(3)%20Diffusion/50%20-%20WATCH%20DOG/Members/Michael%20Taylor/Confluence%20Stuff/This%20is%20a%20test.xlsx

or

file:///L:/Fab Team (Unit Part) Folders/(3) Diffusion/50 - WATCH DOG/Members/Michael Taylor/Confluence Stuff/This is a test.xlsx

Optionally you can insert a web link. This is generally more appealing, as you can just show a name without having the entire link on your page.


author: AnnWorley
body: Please see the options Ted posted here:  
[Confluence: How to place a link to a file on a server share in a confluence page?](https://community.atlassian.com/t5/Confluence-questions/Confluence-How-to-place-a-link-to-a-file-on-a-server-share-in-a/qaq-p/258790#M84981)


Tags: confluence-administration