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

open selected files at once

Post by *Paul Mountit »

is there a way to open all selected files with the default associated application, possibly without starting a new instance if the app is already running?
let's say I need to open 10 excel files and excel is already running: I don't want to start another instance of excel.
thanks
User avatar
Gral
Power Member
Power Member
Posts: 1460
Joined: 2005-01-26, 15:12 UTC

Re: open selected files at once

Post by *Gral »

Should be possible from context menu (right click menu) entry "Open" - probably bolded.
User avatar
Stefan2
Power Member
Power Member
Posts: 4132
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: open selected files at once

Post by *Stefan2 »

Paul Mountit wrote: 2023-01-10, 18:27 UTC possibly without starting a new instance if the app is already running?
That's a setting of that app(s). Read there manuals for command line parameter.
In TC you can create commands to pass that parameter together with selected items to that apps.


There are also tool as alternative for F4s' Texteditor to support you with that doing.

- F4MiniMenu, http://ghisler.ch/board/viewtopic.php?t=35721
- ChoiceEditor, http://www.totalcmd.net/plugring/ChoiceEditor.html
- Open File shell for TC, http://www.totalcmd.net/plugring/OpenFileTC.html
- Total Commander Edit Redirector, http://ghisler.ch/board/viewtopic.php?t=27573
- F4Menu, http://ghisler.ch/board/viewtopic.php?t=17003






 
 
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 »

thanks for the replies
1. the context menu works ok, files are opened in the already running instance of excel (just like with "enter" on a single file from TC)
2. I've tried a buttonbar (dragging excel.exe and the using %P%S as parameters, but this always opens a new instance of excel
3. I don't understand exactly why TC does not open by default all the selected files with enter, but only the one under the cursor. is there any other reason to select some files and then open ONLY the one under the cursor? should it not be the default behaviour of TC?
User avatar
AntonyD
Power Member
Power Member
Posts: 1231
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: open selected files at once

Post by *AntonyD »

3. I don't understand exactly why TC does not open by default all the selected files with enter, but only the one under the cursor. is there any other reason to select some files and then open ONLY the one under the cursor? should it not be the default behaviour of TC?
Support+++++++++
#146217 personal license
User avatar
Stefan2
Power Member
Power Member
Posts: 4132
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: open selected files at once

Post by *Stefan2 »

Paul Mountit wrote: 2023-01-11, 12:29 UTC 3. I don't understand exactly why TC does not open by default all the selected files with enter, but only the one under the cursor.

Maybe because TC doesn't know how the called application handle more-than-one files?
-- Multi-Doc-Interface (TABs) like Notepad++ ? (can handle multiple passed files (me think))
-- Single-Doc-Interface like Notepad2 or Excel ? (needs to open multiple instances, one for each passed file)
-- or do the app need an parameter passed to recognize multi files ? Or do it maybe want a list of files written to a text file and passed as argument ?
Maybe an app can do that all, but need advice how to handle that right now ?



 
User avatar
AntonyD
Power Member
Power Member
Posts: 1231
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: open selected files at once

Post by *AntonyD »

Fairly correct conclusions and questions.
BUT - aren't there any errors in the current state of affairs? Misunderstandings? Does it happen?
Yeah, I want one behavior and I get another. And by reading help - the forum, trial and error, I end up getting what I need.
That is, my problem is consistently solved. And the Same should be here.
At least for a start, Mr.Ghisler can make unambiguous behavior for selected files: IF they have the same extension.
To issue a request at the first such launch - in what form do you want to launch them all? Passing a parameter, a list in quotation marks, a separate instance of the application for each file, .... (also throw in options, please) - and then TC remembers this.
The next time I select in the same way only files of one extension and for which there is already a rule - HOW to process them - this rule is simply silently executed.
#146217 personal license
mmm
Member
Member
Posts: 120
Joined: 2020-08-10, 12:32 UTC

Re: open selected files at once

Post by *mmm »

... and then open ONLY the one under the cursor?
Careful what you write; I do not think it opens the one under the cursor.
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 »

mmm wrote: 2023-01-11, 16:00 UTC
... and then open ONLY the one under the cursor?
Careful what you write; I do not think it opens the one under the cursor.
yes it does, absolutely. even if the file is not selected and there are other selected files.
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 »

Stefan2 wrote: 2023-01-11, 15:27 UTC
Paul Mountit wrote: 2023-01-11, 12:29 UTC 3. I don't understand exactly why TC does not open by default all the selected files with enter, but only the one under the cursor.

Maybe because TC doesn't know how the called application handle more-than-one files?
-- Multi-Doc-Interface (TABs) like Notepad++ ? (can handle multiple passed files (me think))
-- Single-Doc-Interface like Notepad2 or Excel ? (needs to open multiple instances, one for each passed file)
-- or do the app need an parameter passed to recognize multi files ? Or do it maybe want a list of files written to a text file and passed as argument ?
Maybe an app can do that all, but need advice how to handle that right now ?



 
if I press enter, the file is opened by TC with the associated application. I think that this means that TC knows how to handle a single file. if there is more than one file, what's the difference? can't TC handle the second, the third etc. files just like the first one? or it is not possible?
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: open selected files at once

Post by *petermad »

Paul Mountit wrote: 2023-01-11, 17:08 UTC
mmm wrote: 2023-01-11, 16:00 UTC
... and then open ONLY the one under the cursor?
Careful what you write; I do not think it opens the one under the cursor.
yes it does, absolutely. even if the file is not selected and there are other selected files.
When using %P%N as parameter, TC passes the filename under the cursor to the application - even if other files are selected
When using %P%S as parameter, TC passes all the selected files to the application, starting with the one in the top of the current view (depending of the current sorting).

If the application cannot handle multiple filenames, that is not TC's fault.

Some applications can open files from a list of file names inside a file, for that you can use one of these parameters:
%L, %l, %F, %f, %D, %d, %WL, %WF, %UL, %UF
to put the selected filenames in such a file.

Often for using a file list the program needs a switch (like /l) in front of the file name to indicate that it expects a file list or the name of the listfile is preceded with @ - if that is the case the command could be /l %WL or @%WL.

Excel does not seem to support either.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: open selected files at once

Post by *Hacker »

Paul Mountit,
if I press enter, the file is opened by TC with the associated application. I think that this means that TC knows how to handle a single file. if there is more than one file, what's the difference?
The difference is that there is a more or less standard way of opening an application with one file. There are many ways to open multiple files but none of them could be called the standard one. The closest to a standard (not necessarily the best) would be the one that gets executed when opening the context menu and clicking Open.

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.
User avatar
AntonyD
Power Member
Power Member
Posts: 1231
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: open selected files at once

Post by *AntonyD »

Why are we trying to find some kind of middle ground or a single standard by choosing from something existing?
Yes, the TC already has some elements that allow you to work with a set of selected files, ok. Let them continue to be.
Now we could discuss another new concept - a self-learning mechanism for processing files with the same extension.
It doesn't exist, nothing that exists fits it. Development is needed. And we could lay down some conditions/rules for this new paradigm.
#146217 personal license
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: open selected files at once

Post by *Hacker »

AntonyD,
Why are we trying to find some kind of middle ground or a single standard by choosing from something existing?
Because it's the programs that define how they need to be called. E.g. Excel must be called one way, IrfanView another way. TC cannot "force" programs to accept one specific way.

HTH
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.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: open selected files at once

Post by *petermad »

2Paul Mountit
3. I don't understand exactly why TC does not open by default all the selected files with enter, but only the one under the cursor.
It is not TC that does only open the file under the cursor - it is the receiving program (Excel) that only opens the first of the files that TC sends to the program.

You can try this button to open several files at once in Excel:

Code: Select all

TOTALCMD#BAR#DATA
%COMSPEC% /C
if exist %S1\ ((echo DO NOT MARK DIRECTORIES!) & (echo.) & pause) else 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
To make the button:
1. Mark the text in the box here above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctrl+C).
3. Right click on TC's buttonbar and choose "Paste".
You might have to add the full path to excel.exe (like: C:\Program Files\Microsoft Office\root\Office16\)

I don't have any Office programs, so I cannot test if it works myself. To have the chance of all files opening in the same instance of Excel, you might have to open Excel first.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply