I've moved the account linking over.
Here's a button which should do what you've asked for:
If anything is selected, it will just do the selection.
If nothing is selected, it will do the whole folder.
For reference, this is the script code inside the .dcf file above:
function OnClick(clickData)
{
clickData.func.command.deselect = false;
tab = clickData.func.sourcetab;
if (tab.selected.count == 0)
{
// Nothing selected? Do the whole folder.
NamesToClipboard(tab.dirs, tab.files);
}
else
{
// Something selected? Do just the selection.
NamesToClipboard(tab.selected_dirs, tab.selected_files);
}
}
function NamesToClipboard(dirs, files)
{
var fsu = DOpus.FSUtil;
var s = "";
for (var eDirs = new Enumerator(dirs); !eDirs.atEnd(); eDirs.moveNext())
{
// Directory names as-is.
s += eDirs.item().name;
s += "\n"; // Each name on a new line.
}
for (var eFiles = new Enumerator(files); !eFiles.atEnd(); eFiles.moveNext())
{
// File names and sizes in MB.
var i = eFiles.item();
var z = fsu.NewFileSize(i.size);
z.Div(1024*1024);
s += i.name;
s += " ";
s += z.val;
s += "MB \n"; // Each name on a new line.
}
DOpus.SetClip(s);
}
Script is adapted from Commands to copy selected filenames to the clipboard (which didn't include the size originally).