News:

MultiCommander v16.6 is released!

Main Menu

${focusfilepath} tag

Started by espkk, April 18, 2016, 12:11:53

Previous topic - Next topic

espkk

How to get value of "${focusfilepath}"?

In this code it always returns nothing
@var $cmdargs = "powershell dir " + GetTagValue("${focusfilepath}") + "-Recurse | Unblock-File";
MC.Run CMD="powershell" arg="{$cmdargs}"

Mathias (Author)

if you are in MulitScript you got function for that and do not have to use the GetTagValue function..
http://multicommander.com/docs/multiscript/functions/getfilefromview

Like  GetSourceFocusPath();

And as I sad in previous post.. You can't currently append to a result of a function because of a temp variable issue
So get the focuspath into a variable

@var $focusfile = GetSourceFocusPath();
@var $cmdargs = "powershell dir " + $focusfile + "-Recurse | Unblock-File";
MC.Run CMD="powershell" arg="{$cmdargs}"

espkk

I read about this function, but it is only "Get the full path to the item in focus in the source view." AFAIU. What about target view?

espkk

Ok, I misunderstood the meaning of func names, it works, thanks  :)