Page 1 of 1

Obtaining Full Target/Command Line With Arguments For Shortcut

Posted: 16 May 2024 01:25
by robertoleonardo
Hi - I've been trying to figure out a way to create a custom column that shows a shortcuts' FULL target path/command -- including any arguments -- but it looks like #LinkTarget and the built in target properties only get the underlying target path.

for example, i have a shortcut pointed to:

Code: Select all

C:\Program Files\Everything 1.5a\Everything64.exe -startup
But the built-in "target" properties only show:

Code: Select all

C:\Program Files\Everything 1.5a\Everything64.exe
Is there a way to get the full thing, including the "-startup" through scripting so that i can drop it in a custom column?

Thank you!

Re: Obtaining Full Target/Command Line With Arguments For Shortcut

Posted: 16 May 2024 01:30
by jupe
Combine #LinkTarget and System.Link.Arguments

Re: Obtaining Full Target/Command Line With Arguments For Shortcut

Posted: 16 May 2024 01:33
by robertoleonardo
ahhh excellent - thank you!

Re: Obtaining Full Target/Command Line With Arguments For Shortcut

Posted: 16 May 2024 01:41
by robertoleonardo
Oh. I'm dumb. That was embarrassingly easy - thanks for pointing me in the right direction.

For anyone else looking to achieve this in the future, here's the custom column config script that works for me:

Code: Select all

$target = property("#LinkTarget", <cc_item>);
$arguments = property("System.Link.Arguments", <cc_item>);
$full_command = $target . " " . $arguments;
return $full_command;