Start external program for every selected file
Moderators: Hacker, petermad, Stefan2, white
Start external program for every selected file
Is it possible to start a specific program from the Start menu for every selected file?
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
If you have Windows defined default program for the particular extensions, then yes:
command: CMD.exe /c StartSelected.cmd
parameters: %S
Code: Select all
::
:: StartSelected.cmd
::
:StartProgram
IF "%~1"=="" GOTO:EOF
START "" "~%1"
SHIFT /1
GOTO:StartProgram
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
The only "BAT packer" plugin I see on either totalcmd.net or en.totalcmd.pl is Ghisler's MakeBat v1.3 -- which I don't see how that is even relevant to the question at hand: launching multiple selected files.
MakeBat v1.3
MakeBat v1.3
Write-only plugin to create batch files (*.bat) with all the selected files, e.g. for repetitive tasks. May also be used to create mp3 playlists.
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
From what I can tell from L2M's readme. List2Multi needs a very specific command path; within which you have to indicate which program.exe you want to use to open the current selected files.
That doesn't seem to be any more functional than TC's Internal-Association. If all the files are to be opened by the same program, then you could select them & rightClick + Open Internal (or assign a button or keyboard shortcut to cm_ContextMenuInternal).
That doesn't seem to be any more functional than TC's Internal-Association. If all the files are to be opened by the same program, then you could select them & rightClick + Open Internal (or assign a button or keyboard shortcut to cm_ContextMenuInternal).
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I'm doing this via internal associations, e.g. for Text files:
*.txt
New verb "open all with notepad", command:
notepad.exe "%1"
You can find this command in the context menu then. Contrary to Windows associations, TC's internal support multiple files.
*.txt
New verb "open all with notepad", command:
notepad.exe "%1"
You can find this command in the context menu then. Contrary to Windows associations, TC's internal support multiple files.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
That only works if all the files are valid to open with the same program. If you select files (different .ext) that have been configured to open with different programs,
Then you only get the Windows Open on right-click.
And nothing happens at all on double-click.
Optimally, if multiple-extensions are selected and it would entail multiple programs launching, TC would present you with:
Open with default in the context menu, which would launch the first program defined for each extension.
Then you only get the Windows Open on right-click.
And nothing happens at all on double-click.
Optimally, if multiple-extensions are selected and it would entail multiple programs launching, TC would present you with:
Open with default in the context menu, which would launch the first program defined for each extension.
[face=courier]On 03-12-2009 23:18:32 +0000 sqa_wizard wrote:
sw> I recommend List To MultiInstance
+1
This is mine tool of choice in such a case as well - L2M supports relative paths, so I use it with Commander from my flashdrive to run my application regardless of current system association etc.
E.g. my favorite MP3 player is STP, and I use L2M to lunch STP from Commander with selected files as parameters (STP does not support list file as command line parameter):
[/face][/size]
sw> I recommend List To MultiInstance
+1
This is mine tool of choice in such a case as well - L2M supports relative paths, so I use it with Commander from my flashdrive to run my application regardless of current system association etc.
E.g. my favorite MP3 player is STP, and I use L2M to lunch STP from Commander with selected files as parameters (STP does not support list file as command line parameter):
Code: Select all
Command: %COMMANDER_PATH%\tools\l2m.exe
Parameters: /X:"stp.exe" /E:-g /L:"%L" /W /O:3
Start path: %COMMANDER_PATH%\..\STP\
[face=courier]The Protoss do NOT run from their enemies.
It is here, that we shall make our stand.[/face]
It is here, that we shall make our stand.[/face]
2Balderstrom
Ghisler never claimed that it works on double-click. Double-click behavior should be improved. Double-click should execute the standard action.
2Black Dog
For me it's works fine on right-click even when including different internal associations into the selection.Then you only get the Windows Open on right-click.
And nothing happens at all on double-click.
Ghisler never claimed that it works on double-click. Double-click behavior should be improved. Double-click should execute the standard action.
2Black Dog
Internal associations can be used on the go as well.This is mine tool of choice in such a case as well - L2M supports relative paths, so I use it with Commander from my flashdrive to run my application regardless of current system association etc.
[face=courier]On 07-12-2009 22:15:08 +0000 Lefteous wrote:
L> Internal associations can be used on the go as well.
Did I say they can't? %) But L2M is good old stuff and still working nova days.[/face]
L> Internal associations can be used on the go as well.
Did I say they can't? %) But L2M is good old stuff and still working nova days.[/face]
[face=courier]The Protoss do NOT run from their enemies.
It is here, that we shall make our stand.[/face]
It is here, that we shall make our stand.[/face]
Yes, it's this one.Balderstrom wrote:The only "BAT packer" plugin I see on either totalcmd.net or en.totalcmd.pl is Ghisler's MakeBat v1.3 -- which I don't see how that is even relevant to the question at hand: launching multiple selected files.
MakeBat v1.3Write-only plugin to create batch files (*.bat) with all the selected files, e.g. for repetitive tasks. May also be used to create mp3 playlists.
You create a bat with "%N" command and run it.
It's quite flexible, you can add parameters etc.
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
Perhaps, but I don't see it as able to do anything except cycle thru a list of files and issue a command (or more) to process said file(s).m^2 wrote:Yes, it's this one.Balderstrom wrote:The only "BAT packer" plugin I see on either totalcmd.net or en.totalcmd.pl is Ghisler's MakeBat v1.3 -- which I don't see how that is even relevant to the question at hand: launching multiple selected files.
MakeBat v1.3Write-only plugin to create batch files (*.bat) with all the selected files, e.g. for repetitive tasks. May also be used to create mp3 playlists.
You create a bat with "%N" command and run it.
It's quite flexible, you can add parameters etc.
A basic script can do that with a FOR loop to generate a list of files with DIR, or GOTO like I posted above (if you have selected files), and you can add additional logic into a script that cannot be done with MakeBAT. Honestly I wouldn't call that quite flexible -- I'd say that's pretty limited in scope.