I've created a button in the button bar and it works fine for a single file, but when I select multiple files using the right mouse button and then click the button in the button bar, it only does the button action on the last file that I selected. Is there a way to do the button action on each file?
The example button for notepad.exe is a good example for this. The command is "notepad.exe". The parameters are "?%P%N". I select 2 text files in my source window and click the notepad button and it only edits the last file I selected. I want to tell Total Commander that when I click on the notepad button, it should run notepad.exe for each of the text files I have selected. So, if I select 2 text files and click the notepad button, it will edit the first file. When I quit notepad for the first file, Total Commander will edit the second file I had selected, etc.
Can this be done?
Thanks,
Dave
How to create a button action for each file selected?
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 3
- Joined: 2005-04-26, 10:15 UTC
@dbaugh:
You have to use parameter %L but this will only work for programs that support transfering files as a file list, like UltraEdit, WinRAR, etc...
For programs like Notepad you need List2multiInstance.
It starts a separate notepad instance for each file in the list and it's very powerful, you can even use regular expressions and save templates.
For programs like Winamp which expect the files to be transfered in one command line use List2str.
An alternative for that would be the excellent Choice Editor, which can be used to open all marked files with different programs after pressing F4.
The afore mentioned lst2run from mirkocosta uses a really crappy syntax, try it out yourself, you will see when you compare with List2multiInstance. For easy stuff like starting notepad it still can do its job of course.
Icfu
You have to use parameter %L but this will only work for programs that support transfering files as a file list, like UltraEdit, WinRAR, etc...
For programs like Notepad you need List2multiInstance.
It starts a separate notepad instance for each file in the list and it's very powerful, you can even use regular expressions and save templates.
For programs like Winamp which expect the files to be transfered in one command line use List2str.
An alternative for that would be the excellent Choice Editor, which can be used to open all marked files with different programs after pressing F4.
The afore mentioned lst2run from mirkocosta uses a really crappy syntax, try it out yourself, you will see when you compare with List2multiInstance. For easy stuff like starting notepad it still can do its job of course.
Icfu
This account is for sale