open selected files at once

English support forum

Moderators: white, Hacker, petermad, Stefan2

Paul Mountit
Junior Member
Junior Member
Posts: 66
Joined: 2020-04-18, 21:04 UTC

Re: open selected files at once

Post by *Paul Mountit »

petermad wrote: 2023-01-12, 11:12 UTC You can try this button to open several files at once in Excel:
thanks
I've tried this solution, but it opens a new instance of excel for each selected file.
I've tried also to drag and drop excel.exe on the button bar using %P%S as parameters, it's better but anyway opens all selected files in a new instance of excel, ignoring the already running instance.
I need to try with F4menu or F4minimenu, maybe tomorrow
Last edited by Paul Mountit on 2023-01-13, 13:36 UTC, edited 1 time in total.
Fla$her
Power Member
Power Member
Posts: 2293
Joined: 2020-01-18, 04:03 UTC

Re: open selected files at once

Post by *Fla$her »

Paul Mountit wrote: 2023-01-12, 16:58 UTCok. I'll keep using shift+f10
The case, of course, is yours, if you are only interested in the built-in functionality. I preferred the workarounds to open the selected by Enter.
Fla$her wrote: 2023-01-12, 15:24 UTCI use it on a regular basis with the help of internal associations, TCFS2 and additional tools.
Overquoting is evil! 👎
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Re: open selected files at once

Post by *Ovg »

Paul Mountit wrote: 2023-01-12, 17:43 UTC I've tried this solution, but it opens a new instance of excel for each selected file.
I've tried also to drag and drop excel.exe on the button bar using %P%S as parameters, it's better but anyway opens all selected files in a new instance of excel, ignoring the already running instance.
I need to try with F4menu or F4minimenu, maybe tomorrow
Useless, Excel doesn't support MDI interface since 2013 version ....
I'm using F4MiniMenu, but each xls file is opened in a new instance of Excel
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
User avatar
petermad
Power Member
Power Member
Posts: 14787
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: open selected files at once

Post by *petermad »

2Paul Mountit
I've tried this solution, but it opens a new instance of excel for each selected file.
Then try this modification:

Code: Select all

TOTALCMD#BAR#DATA
%COMSPEC% /C
if exist %S1\ ((echo DO NOT MARK DIRECTORIES!) & (echo.) & pause) else start "" excel.exe %P%N && timeout /T 2 && chcp 65001 && %%COMSPEC%% /C for /F "usebackq delims=" %%n in (`type %WF`) do start "" excel.exe "%%n"
excel.exe
Open all selected files in Excel at the same time

1
-1
I have found references on the net that starting excel with one file and then starting it again for the rest of the files can work for opening all in the same instance - but I don't know if it works for all versions of excel.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: open selected files at once

Post by *Usher »

Paul Mountit wrote: 2023-01-12, 15:29 UTC
white wrote: 2023-01-12, 14:36 UTC
Paul Mountit wrote: 2023-01-12, 13:52 UTC is there any reason to select some files and then open ONLY one of them (or even not one of them) pressing "enter"?
I remember back in the days of the early Windows versions when I hit Enter and accidentally had a number of files selected. Omg, the horror :P The OS couldn't handle it.
ok, but we're no more back in the days
Wrong.It was NEVER fixed, it's just limited in Windows newer than XP. Read MS Support article (original KB number: 2022295), please:
https://support.microsoft.com/en-us/help/2022295/context-menus-are-shortened-when-more-than-15-files-are-selected
MS Support wrote: Context menus are shortened when more than 15 files are selected

This is by design. These context menu items won't appear if selecting more than 15 items to avoid accidentally performing these actions on a large number of files.
If you try to open more files or folders (for example three times 15 folders), Windows Explorer may just get unresponsive and hang. Other programs may show other side effects. I haven't tested opening xls files in Windows XP, only tried with txt file and Notepad. I selected 200 small txt files (only 1.2 MB in total) and pressed Enter. Explorer warned me, if I really would like to open all of them. I confirmed, but Notepad opened only 150 files and stopped.
Andrzej P. Wozniak
Polish subforum moderator
Paul Mountit
Junior Member
Junior Member
Posts: 66
Joined: 2020-04-18, 21:04 UTC

Re: open selected files at once

Post by *Paul Mountit »

Fla$her wrote: 2023-01-12, 15:24 UTCI use it on a regular basis with the help of internal associations, TCFS2 and additional tools.
please, can you share your solution?
thanks
Last edited by Paul Mountit on 2023-01-13, 13:35 UTC, edited 1 time in total.
Paul Mountit
Junior Member
Junior Member
Posts: 66
Joined: 2020-04-18, 21:04 UTC

Re: open selected files at once

Post by *Paul Mountit »

Ovg wrote: 2023-01-12, 19:00 UTC Useless, Excel doesn't support MDI interface since 2013 version ....
I'm using F4MiniMenu, but each xls file is opened in a new instance of Excel
oh.
didn't know this, I'm still using excel 2010 version
but - excel version aside - I'd use this also for pdf, jpeg, etc.
Last edited by Paul Mountit on 2023-01-13, 13:34 UTC, edited 1 time in total.
Paul Mountit
Junior Member
Junior Member
Posts: 66
Joined: 2020-04-18, 21:04 UTC

Re: open selected files at once

Post by *Paul Mountit »

Usher wrote: 2023-01-13, 02:38 UTC https://support.microsoft.com/en-us/help/2022295/context-menus-are-shortened-when-more-than-15-files-are-selected
MS Support wrote: Context menus are shortened when more than 15 files are selected
This is by design. These context menu items won't appear if selecting more than 15 items to avoid accidentally performing these actions on a large number of files.
well, the 15 files limit with context menu sounds good. if "enter" could work the same on selected files (no more than 15) I think it would be ok.
Last edited by Paul Mountit on 2023-01-13, 13:34 UTC, edited 1 time in total.
Paul Mountit
Junior Member
Junior Member
Posts: 66
Joined: 2020-04-18, 21:04 UTC

Re: open selected files at once

Post by *Paul Mountit »

petermad wrote: 2023-01-13, 00:37 UTC 2Paul Mountit
I've tried this solution, but it opens a new instance of excel for each selected file.
Then try this modification:
it does not work
this still opens a separate instance of excel for each selected file (ignoring the already running instancd) and the opens another instance with a blank workbook
Last edited by Paul Mountit on 2023-01-13, 13:32 UTC, edited 1 time in total.
Fla$her
Power Member
Power Member
Posts: 2293
Joined: 2020-01-18, 04:03 UTC

Re: open selected files at once

Post by *Fla$her »

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.
Overquoting is evil! 👎
Paul Mountit
Junior Member
Junior Member
Posts: 66
Joined: 2020-04-18, 21:04 UTC

Re: open selected files at once

Post by *Paul Mountit »

Fla$her wrote: 2023-01-13, 12:08 UTC OK. I'll give you a simple solution that only involves system associations (for internal, it's more complicated).
not exactly my definition of simple, but thanks, I'll try this
P. S.: Please avoid overquoting.
ok, i see what you mean
Paul Mountit
Junior Member
Junior Member
Posts: 66
Joined: 2020-04-18, 21:04 UTC

Re: open selected files at once

Post by *Paul Mountit »

just one consideration more:

select 2 or more files
leave cursor inside or outside the selection

case A
with "F5" (copy), "F6" (move), "Alt+F5" (zip)
confirmation dialog
all the selected files are copied/moved/zipped to the destination dir

case B
with "F3" (preview), "enter" (open)
no confirmation dialog
only the file under the cursor, selcted or not selected, is previewed/opened

I don't understand why, given the presence of a selection of files, TC does not treat by default case B exactly like case A
is there any reason I don't see? maybe someone can explain?
thanks
User avatar
Dalai
Power Member
Power Member
Posts: 9383
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: open selected files at once

Post by *Dalai »

Paul Mountit wrote: 2023-01-13, 13:39 UTCcase B
with "F3" (preview), "enter" (open)
no confirmation dialog
only the file under the cursor, selcted or not selected, is previewed/opened
Regarding F3: This is NOT the default behavior! By default TC will open the first selected file in Lister and Lister allows to cycle through all selected files via menu and N/P (next/previous) keys. You may have remapped the F3 key to a different command or something.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Hacker
Moderator
Moderator
Posts: 13061
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: open selected files at once

Post by *Hacker »

Dalai,
or something.
Configuration - Options - Edit/View.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Paul Mountit
Junior Member
Junior Member
Posts: 66
Joined: 2020-04-18, 21:04 UTC

Re: open selected files at once

Post by *Paul Mountit »

Dalai wrote: 2023-01-13, 13:46 UTC Regarding F3: This is NOT the default behavior! By default TC will open the first selected file in Lister and Lister allows to cycle through all selected files via menu and N/P (next/previous) keys. You may have remapped the F3 key to a different command or something.
when I press F3 the file under the cursor is opened in lister. I don't think I've remapped F3 key
edit: you're right, see next reply
Last edited by Paul Mountit on 2023-01-13, 16:41 UTC, edited 1 time in total.
Post Reply