Obtaining Full Target/Command Line With Arguments For Shortcut

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
robertoleonardo
Posts: 28
Joined: 17 Jun 2021 19:56

Obtaining Full Target/Command Line With Arguments For Shortcut

Post 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!

jupe
Posts: 3292
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

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

Post by jupe »

Combine #LinkTarget and System.Link.Arguments

robertoleonardo
Posts: 28
Joined: 17 Jun 2021 19:56

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

Post by robertoleonardo »

ahhh excellent - thank you!

robertoleonardo
Posts: 28
Joined: 17 Jun 2021 19:56

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

Post 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;

Post Reply