Display target folder in a column

and also, target folder IF DIFFERENT FROM LOCATION

I'm not sure what you're asking for, sorry.

Target folder of what? Displayed where?

I would like to be able to see the paths to the location of both the hyperlink and its target file or folder.

If you mean shortcuts, there is already a Target column which shows what they point to.

(The Description column also shows it, mixed in with other detail depending on the file types.)

It appears that I did mean 'target'.
This software is fantastic!
Is it possible to identify shortcuts that are located in the same directory as their target?

also, is it possible to display the target folder without the path?

You could do that via scripting but nothing built-in will tell you that (without having to look at two columns and compare them manually).

A script column could do that, but there's nothing built-in for it.

is scripting for dopus simple?
are there tutorials?
are any dopus forums available for posting scripting requests?
what sort of time and cost would be incurred?

If you haven't already found the Buttons & Scripts section of the forum, or the Scripting section of the manual, then you'll probably find scripting quite difficult. :slight_smile:

This add-in should do what you want.

function OnInit(initData) {
    initData.name = 'TargetParent';
    initData.version = '2021-06-23';
    initData.copyright = '';
    initData.url = 'https://resource.dopus.com/t/display-target-folder-in-a-column/38757';
    initData.desc = '';
    initData.default_enable = true;
    initData.min_version = '12.0';
}

function OnAddColumns(addColData) {
    var col = addColData.AddColumn();
    col.name = 'TargetParent';
    col.method = 'OnColumn';
    col.label = 'TargetParent';
    col.justify = 'left';
    col.autogroup = true;
}

function OnColumn(scriptColData) {
    var item = scriptColData.item;
    if (item.is_dir) return;
    if (item.metadata.other.target_type != 'linkfile') return;

    var vecPath = item.metadata.other.target.Split();
    scriptColData.value = vecPath(vecPath.count - 2);
}

ColumnTargetParent.js.txt (841 Bytes)

How to

How to use buttons and scripts from this forum

2 Likes

I have just added your script (button?).
Exactly what I wanted.
Thank you

Is it possible to add a column that will compare 'location (relative)' with 'target parent' and display 'same' or 'different' ?

location (relative)

If you mean the column that appears in flat view, the answer is probably no.

If this request is the same as or similar to

to be able to see the paths to the location of both the hyperlink and its target file or folder

and

to identify shortcuts that are located in the same directory as their target

the answer is probably yes.

is it possible to automatically highlight adjacent cells (or cells in the same row) that contain identical content?