Page 1 of 1

Passing current filename into Catalog

Posted: 01 Nov 2022 18:32
by acheton
Hi there

I am trying to launch an application using a command line option from the catalog. However I am having a problem passing the current filename as a parameter. I understand that %1 ought to do it or <curitem> however neither seem to work. I've attached the example I'm using. Can anyone point me in the right direction?

thanks


Paul

Re: Passing current filename into Catalog

Posted: 01 Nov 2022 19:41
by highend
There is no need to use a placeholder for arguments, they are appended to the end of the application call automatically.

So try to use "...veracrypt..." /letter x /volume

and if something like this doesn't fit the e.g. order of the arguments, call a script that get's the selected items itself and do whatever is necessary with them...

Re: Passing current filename into Catalog

Posted: 02 Nov 2022 22:22
by acheton
Thanks for the reply, the first method doesn't work, sadly. I've converted to a script using run:

run '"C:\Program Files\VeraCrypt\VeraCrypt.exe" /letter x /volume <curitem>'

This executes the program however <curitem> is not substituted by the currently selected item. any pointers please?

Re: Passing current filename into Catalog

Posted: 02 Nov 2022 22:43
by highend

Code: Select all

$item = <get SelectedItemsPathNames>; run """C:\Program Files\VeraCrypt\VeraCrypt.exe"" /letter x /volume ""$item""";
and the action on click must be "Go to Location"^^

Re: Passing current filename into Catalog

Posted: 06 Nov 2022 19:06
by acheton
Thanks Highend, that's great.