Page 1 of 1

Favourite Toolbar RUN action on selected items

Posted: 31.07.2012, 17:49
by BGM
When we set a toolbar button to run an application, we are able to choose %ActiveSel% and %ActiveSelAsFile%

Now, I have a commandline I need to execute that will run on each of all the selected files individually.
Thus, if I select 5 files,
I want the commandline to be run 5 times, once for each file.

If I am not mistaken, right now, all 5 selected files are sent as a single parameter to the application?

Also, what is the difference between %ActiveSel% and %ActiveSelAsFile% ?

Re: Favourite Toolbar RUN action on selected items

Posted: 31.07.2012, 22:24
by Marek
%ActiveSel%
Parameter list: "SeleCtemItemFullPath1" "SeleCtemItemFullPath2" "SeleCtemItemFullPath3"..."SeleCtemItemFullPathX"
%ActiveSelAsFile%
The text file will be created (e.g. C:\Users\...\AppData\Local\Temp\FreeCommander6868\83F0.tmp )
SeleCtemItemFullPath1
SeleCtemItemFullPath2
SeleCtemItemFullPath3
...
SeleCtemItemFullPathX

Parameter list: "C:\Users\...\AppData\Local\Temp\FreeCommander6868\83F0.tmp"

Re: Favourite Toolbar RUN action on selected items

Posted: 02.08.2012, 22:41
by BGM
So, if I select three files and run a command with %ActiveSel%, I get (correct me if I am wrong):
mycommand Selection1.file Selection2.file Selection3.file

but I don't I don't follow you on the %ActiveSelAsFile% part. I'm not sure what is happening with this. If I use this parameter with notepad, it creates a new text file and puts the file path of the selected object in the new text file. Does that mean that the application tries to create a new file? I am a bit confused.

With regard to my original question, is there a way to select 5 files and have the commandline to be run 5 times, once for each file?

Re: Favourite Toolbar RUN action on selected items

Posted: 06.08.2012, 21:43
by Marek
If I use this parameter with notepad
Using this parameter with notepad is not possible - notepad does not supports such parameter.
You need some application/script that read the file (from the Parameter) and call something for each line in the file.

Re: Favourite Toolbar RUN action on selected items

Posted: 06.08.2012, 21:53
by BGM
What about a feature request to allow FC to handle each selected file running it as a parameter for a separate command? Maybe a separate environmental like, %ActiveSelAsSingle% or something like that?

Sure, it could be scripted with AutoHotkey, but that is a workaround to a nice feature.