Linking to Folders or Pictures Files directly from within Scrivener for Windows

This topic has to do with direct ways to link to files or folders on your hard disk, thereby saving a Scrivener project’s file size from exponential growth when something like many, many pictures are included in a project. In particular, it may help those who simply want to reference photos for inspiration, but whose pictures do not form part of their intended publication.

First a warning. When I used to do this in Microsoft OneNote, I would get a Microsoft Security Notice popup saying the following: “Microsoft Office has identified a potential security concern.” and “This location may be unsafe.” and “Hyperlinks can be harmful to your computer and data. To protect your computer, click only those hyperlinks from trusted sources. Do you want to continue? Yes. No.” Pressing Yes would open the link.

Since I was doing historic search, which involved thousands of pictures, stored in folders sorted by date (yyyy-mm-dd), the security notice irritated me. I googled and found I could turn the notice off forever on my machine in the registry, using Regedit (opening the Registry Editor), which I did – with no adverse effects, ever.

Now, I really don’t know if Scrivener will initiate such a warning as Microsoft does in its Office Apps. Also, I doubt the Literature & Latte team would want to voluntary breach an operating system security standard, so let’s leave it to the interested users out there to do their own googling on how to turn off the security notice, if that’s their buzz. But BEWARE, tampering with the registry can potentially stuff up your machine at a great cost to fix.

Back to my story. Naturally, I wanted Scrivener to do the same thing and couldn’t quite get it right. So, I took one of the direct links in OneNote and copied it into Scrivener (normal Copy and Paste exercise) – and it works.

An example is a photo of Johannesburg Station in 1969. In Research, I have a Folder called Johannesburg. I have text that says Station Building 1969. In the Pictures Folder on my hard disk, I have a photo named Johannesburg Station 1969.jpg. I right-click on the photo and select ‘Copy as path’.

Back in Scrivener, I highlight the text Station Building 1969, press Ctrl-Shift-L and the Link dialogue pops up. I then select the File button and paste the link. BUT there’s more to do: Delete the inverted commas at the beginning and end of what you pasted and add another /, not a Windows back-slash, before your path. Your syntax will look something like this:
/C:\\Users\\UserName\\Pictures\\Johannesburg Station 1969.jpg ‘UserName’ is the unique name allocated to your Windows environment when you setup Windows. (I don’t know why the pasted syntax has so many slashes, after you’ve edited it and click on Ok. The number of slashes also varies at times, so it’s best to follow the alternative [see next paragraph] for your own sanity.)

Alternatively, you can change the pasted syntax to:
/C:/Users/UserName/Pictures/Johannesburg Station 1969.jpg (without leading and trailing inverted commas) and click Ok. (Note the direction of the slashes have changed, and clicking the link still works.)

To view a folder of pictures, as may sometimes be your intent, simply end your link at Pictures (the deepest folder), without a further slash.

Potentially, you can save the files you want to access where you like in your working environment, even in the cloud, and this will work. You simply need to know where your content is stored and copy the appropriate path.

Hope this helps someone.

1 Like

Furthermore, such a link would work and be potentially better placed in Notes alongside a particular Scene - for ease of reference.

For Word and Excel, at least, you add the folder(s) to the Trust Center to turn off the warning. I don’t use OneNote, so I am not sure if it works the same. In Word and Excel, go to File/Options/Trust Center/Trust Center Settings, then select Trusted Locations and add the folders from where your files are chosen.

1 Like

Some programming and macro languages use the slash character to indicate “escape” so you can use characters that ordinarily would be interpreted as something other than a normal character. So if you want a slash, you escape it with a slash, ending up with “\”.

Thank you for this. In truth, I’ve never looked at Trust Center. OneNote does have Trust Center, but no category for Trusted Locations … I’ll have to explore to see if such can be added.

Thanks for the explanation.
After writing the whole rigmarole about how to copy and paste the location link into Scrivener, I reaslised that Scrivener does it easier, the other way around, using Edit > Add Link > File button > Browse. Since my work is all text, I no longer need to store pictures in Research. I simply have a link to where my pictures are found in a folder on my hard disk.
And it auto inserts the link in a common format understood by Windows and Mac:
/C:/Users/username/OneDrive/Pictures/Scrivener Projects/Book Title/Strand Street Quarry.png

1 Like