UNC or network server addresses as links in TiddlyWIki

Folks,

I have started moving TiddlyWikis and content to a Network drive, with paths of the form \\server\share\folder (I understood these to be called UNC paths) on Microsoft Windows to my Synology NAS. I would like to update links within my current wikis so they don’t break. Most are full paths of the form `file://C:/folder/filename.ext" but I am not sure how to use the UNC paths.

Is anyone currently doing this that can set me strait?

[[linkname|uncpath]] equivalent and even external links if possible.

Post Script: I would like to avoid the need to map drives if possible

Followup:

The following address works rather than the existing windows \server\share\path you can use [[linkname|file://server/share/folder]] and it seems two to four slashes are also valid eg: file:///server/share/folder interestingly such paths open the browser file listing with an address of the form server/share/folder but lists it as \\server\share\folder

I imagine other forms are still valid so I look forward to other answers.

Questions:

  • Given windows provides addresses of the form \\server\share\folder how best can we get tiddlywiki to interpret these to either;
    • file://server/share/folder
    • Or accept directly
      • \\server\share\folder
      • file:\\server\share\folder

Hi, Tony —

I share and cross-link several TiddlyWikis at work over the network and have arrived through trial-and-error at the convention of using:

[[linkname|file://///server/path/to/file.ext]]

… with five (!) forward-slashes.

I’m a big fan of Directory Opus and prefer it to Windows’s built-in File Explorer. I’d noticed a while back that when it converted directory paths to URLs, it would use the file:// protocol and three additional forward slashes. That worked most reliably for me in sending links via e-mail and embedding them in TiddlyWikis, so that’s the convention I adopted.

Maybe slashes #1 and #2 are part of the file: protocol specification, #3 tells the browser, “O.K., we’re looking at a network path,” #4 says, “start at the root,” and #5 is simply, “we’re parsing the path now”? (This is just me me making up stuff that might be true. I have no idea.)

I believe the confusion has to do with how URLs and path names aren’t actually the same/interchangeable, despite having a lot in common in their syntax. It’s one of those quirks I suddenly wish I had a better understanding of.

1 Like

Technically, it’s a scheme, not a protocol.

@Secret-HQ FIVE slashes? Wow. You must have some “compensating errors” in there or you’re very lucky.

@TW_Tones The easiest to digest (discusses UNC paths too) file URI scheme - Wikipedia. (Pay attention to the footnotes.)

The horse’s mouth: rfc8089

From the ietf doc for rfc8089:

This document […] defines a common syntax that is intended to interoperate across the broad spectrum of existing usages. At the same time, it notes some other current practices around the use of file URIs.

… which might explain why five slashes “gets through” :man_shrugging:

Personally, I would vote for file:, not UNC – though I’d have a hard time making a sound and reasonable case for it, on the spot.

1 Like

Thanks @Secret-HQ and @CodaCoder

UNC is what we start with with windows shares, if we don’t map a drive letter. I already wrote a conversion macro, but I am trying to get a deep understanding and perhaps eventually see if perhaps tiddlywiki can deal with them natively. I already have the ability to drag, drop, paste, copy, import and linkify, open most schemes and feel UNC may be the last leg.

I also have a method that looks at given input, from lists in text or field contents that automatically builds appropriate html links according the the scheme and provides a default icon.