Paul Mountit wrote: 2023-01-13, 10:15 UTCplease, can you share your solution?
OK. I'll give you a simple solution that only involves system associations (for internal, it's more complicated).
1. Save
OpenSelFilesBySystem.vbs (ANSI/UTF-16):
Code: Select all
'βββββββββββββββββββ VBS ββββββββββββββββββ
' Purpose: system opening of selected files
' Parameter: %WL
'ββββββββββββββββββββββββββββββββββββββββββ
If WSH.Arguments.Count = 0 Then WSH.Quit
Set Shell = CreateObject("Shell.Application")
Set List = CreateObject("Scripting.FileSystemObject")._
OpenTextFile(WSH.Arguments(0),,,-1)
Do: F = List.ReadLine
If Right(F, 1) <> "\" Then Shell.ShellExecute F,,,"open"
Loop Until List.AtEndOfStream: List.Close
Set List = Nothing: Set Shell = Nothing
2. Create
em_SystemOpeningOfSelFiles where:
Command: %COMMANDER_PATH%\Scripts\OpenSelFilesBySystem.vbs
Parameters: %WL
3. Download and unpack
TCFS2 (example path below) if not:
4. Open the internal associations dialog (
cm_InternalAssociate) and specify
* as the mask.
In the
Open: field, specify
"%COMMANDER_PATH%\Utils\TCFS2\TCFS2.exe" /ef tem(em_SystemOpeningOfSelFiles)
In the icon selection dialog path field, specify any character (space, asterisk, colon or any other).
After clicking OK, move this list item to
the very bottom and click OK again.
Now the opening of selected files whose extensions are not related by internal associations will occur by Enter, if the cursor is on one of the selected objects and no file with these extensions is selected, otherwise will open the object under the cursor. If desired, to involve the selected list, it's possible automatically move the cursor located outside the selection to the first or last selected file.
P. S.: Please avoid overquoting.