File Link Rules

Managing Omniscope File Paths/Links

Absolute vs relative links to related files

 

This article describes how Omniscope builds links to related files given a base folder, how the link field and the base folder interact, and what bearing the IOK file's location has on the link configuration.

Links are created by choosing a base folder and using field(s) to build up the rest of the link.  The base folder provides a context for the link building, but isn't always relevant depending on the link configuration and field contents.

Let's consider the following example:

Base folder: "D:\Files"
Link configuration: [Link]    (i.e. just a single field "Link" with no other fields or link text)
 

In this case the resulting link for individual records would be as follows for the given "Link" field values:

Link field contentsResulting linkNotes
C:\file.txtC:\file.txtBecause the link field contains a fully absolute path, this overrides the base folder.  In this case the base folder is entirely irrelevant.  No matter what the base folder is or where the IOK file is saved, this will always be the link used.
\file.txtD:\file.txt The link field is partially absolute.  It does not contain a drive letter, but has a leading backslash.  This means that the base folder's drive letter is used, but the base folder's path is ignored.
file.txt D:\Files\file.txt The link field contains a simple filename.  This is the normal usage, and creates a link to a file within the base folder.
Subfolder\file.txtD:\Files\Subfolder\file.txt The link field contains a subfolder and filename, resulting in a link to a file within a subfolder of the base folder.

 

IOK file location

When you save an IOK file, the base folder is recorded in the IOK file using a relative path to the IOK file.  This is deliberate behaviour intended to support the case where you have an IOK file and an associated folder of documents, which may be moved together between different folders.
 
In the above example, should you save the IOK file in "D:\Files", the base folder would be recorded as "the same folder as the IOK file".  Providing the documents are moved with the IOK file, and you open the IOK file from "E:\Docs" and went into the link configuration, the base folder would then read "E:\Docs".
 
Should you save the IOK file in "D:\", the base folder would be recorded as "Files", meaning "the subfolder Files adjacent to the IOK file location".  Again, providing the documents are moved with the IOK file, and you open the IOK file from "E:\Docs" and went into the link configuration, the base folder would then read "E:\Docs\Files".
 
But should you save the above IOK file, as configured with a base folder "D:\Files", saving in the folder "F:\Stuff", the base folder would remain absolute as "D:\Files", since a relative path cannot be constructed from "F:\Stuff" to "D:\Files".
 
If your IOK file moves around independently of your documents, you either ensure the link field contains absolute paths, or you should never save the IOK file within the same drive as your documents.  Should this make your situation awkward, please start a discussion on our forums so we can explore ways to address this.