Fav. Toolbar -> Separate for each (...) -> %ActiSelName% NOK

Bugs and issues - current donor version.
Post Reply
Message
Author
kino
Posts: 61
Joined: 01.04.2013, 21:24

Fav. Toolbar -> Separate for each (...) -> %ActiSelName% NOK

#1 Post by kino » 18.07.2016, 12:53

Hello,

I was willing to expand some of my favorite tools to iterate on selected items.

Unfortunately, if %ActivSel% seems to resolve correctly on full path to file at each iteration, %ActivSelName% remains as is, litterally "%ActivSelName%"

I've tested it on two files a.txt and b.txt that I select and on which I apply my favorite ad hoc tool :

Code: Select all

cmd.exe with Parameter field as :
/K echo %ActivSel% %ActivSelName%
it yields :

Code: Select all

"C:\Temp\a.txt"  %ActivSelName%
"C:\Temp\b.txt"  %ActivSelName%
whereas I would expect :

Code: Select all

"C:\Temp\a.txt"  a.txt
"C:\Temp\b.txt"  b.txt
yes ?

Thanks
(I'm using FreeCommander XE 2016 Build 725 64-bit donor)

Marek
Author
Author
Posts: 2535
Joined: 10.04.2006, 07:48
Location: Germany
Contact:

Re: Fav. Toolbar -> Separate for each (...) -> %ActiSelName%

#2 Post by Marek » 20.07.2016, 18:50

With your definition of the favorite tool I get:

Code: Select all

"C:\temp\a.txt" "C:\temp\b.txt" "a.txt" "b.txt" 
May be you can use %ActivSelAsFile%. The file content is:

Code: Select all

C:\temp\a.txt
C:\temp\b.txt

kino
Posts: 61
Joined: 01.04.2013, 21:24

Re: Fav. Toolbar -> Separate for each (...) -> %ActiSelName%

#3 Post by kino » 25.07.2016, 10:06

Hello Marek,

Thanks for answering.

I do not understand clearly your one-line output where a.txt and b.txt are interlaced (?)
I tried %ActivSelAsFile% and %ActivItem% as follows :

Code: Select all

cmd.exe with Parameter field as :
/K echo %ActivSel% %ActivSelAsFile% %ActivItem%
but it yields respectively (in two separate DOS consoles) :

Code: Select all

"C:\Temp\a.txt"  C:\Temp\APPS\FreeCommanderXE\FreeCommander21484\43C1.tmp b.txt
"C:\Temp\b.txt"  C:\Temp\APPS\FreeCommanderXE\FreeCommander21484\43C1.tmp b.txt
Thanks

Marek
Author
Author
Posts: 2535
Joined: 10.04.2006, 07:48
Location: Germany
Contact:

Re: Fav. Toolbar -> Separate for each (...) -> %ActiSelName%

#4 Post by Marek » 26.07.2016, 21:12

I do not understand clearly your one-line output where a.txt and b.txt are interlaced (?)
Suppose you have the tool MyTool.exe. The call with %ActivSelAsFile% :

Code: Select all

MyTool.exe %ActivSelAsFile%
If you use the parameter %ActivSelAsFile%, then FreeCommander create first temp file - e.g. C:\Temp\APPS\FreeCommanderXE\FreeCommander21484\43C1.tmp.
The content of the file - selected items:

Code: Select all

C:\temp\a.txt
C:\temp\b.txt
Then the %ActivSelAsFile% will be replaced with C:\Temp\APPS\FreeCommanderXE\FreeCommander21484\43C1.tmp.
Solved call:

Code: Select all

MyTool.exe C:\Temp\APPS\FreeCommanderXE\FreeCommander21484\43C1.tmp
MyTool.exe must be able to read the file with the selected items.

beermatt
Posts: 1
Joined: 18.05.2019, 14:03

Re: Fav. Toolbar -> Separate for each (...) -> %ActiSelName% NOK

#5 Post by beermatt » 18.05.2019, 14:39

Sorry for bringing up an old post, but it seems to be a bug that is still present, and googling brought me here so thought it would be a good place to go from.

After further experimenting I think I can see why Kino had the problem but Marek didn't. In summary it is the "seperate for each selected item" tickbox that isn't working properly, full troubleshooting steps below.

64 bit donor version 790a. All the following using the command cmd. All other options default unless specified. 2 files selected when running the tests.
  • With the parameter
    /c echo %ActivSelName% & pause
    It works
  • Same as above but tick the "Seperate for each selected item", the variable still works but it doesn't run a seperate command for each one. In other words ticking the box does nothing :-/
  • Leaving the box ticked, if I now add activesel so the parameter looks like this
    /c echo %ActivSelName% %ActivSel% & pause
    Now the tickbox appears to work as expected as it launches 2 seperate CMD windows. BUT it breaks the activeselname variable :-( and just shows the variable name instead of the filename it is referencing. This is like the problem Kino was having.
  • Keeping the same parameter (both variables), if I now remove the tick from the box "Seperate for each selected item", all the variables work again.

I think you're doing a great job with the software Marek, it's improved a lot over the years and has some great functionlity now.

Would really appreciate this fixing, being able to symbolic link items between the panes is really important for me.

Cheers, Matt

Post Reply

Who is online

Users browsing this forum: No registered users and 176 guests