How to open multiple files at once?

English support forum

Moderators: white, Hacker, petermad, Stefan2

cool.bambus
Junior Member
Junior Member
Posts: 6
Joined: 2010-04-12, 15:28 UTC

How to open multiple files at once?

Post by *cool.bambus »

Hello again,

now that my first question (inline filename search) was answered so quickly, I'll try with the second issue that I've been unable to resolve, so far.

It might sound stupid, but I just have not managed to find out:
How can I open multiple files with TC?
If I mark files and hit enter, only the currently active file will open, but not marked files, as I would expect (this would also resemble windows explorer operation).

Now, I have already installed choice editor from (can't post the internet link as I'm too new to the forum), as I read in another thread, but this also would not help.

Any suggestion?

Thank you very much,
cool.bambus
User avatar
Vochomurka
Power Member
Power Member
Posts: 814
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

1) Create a button with your program in the Command field and specify %P%S (or just %S) as a parameter. Detail is available via pressing F1 in the button creation box;
2) Use utilities list2str and listmulti (search through the forum). These utilities load all selected files to the specified program.
Some application can accept the list passed by %S parameter, others work better with list2str, some others with listmulti. You should experiment.
Good luck.

Added
ListMulti can be downloaded here (page in Russian).
Single user license #329241
PowerPro scripts for Total Commander
cool.bambus
Junior Member
Junior Member
Posts: 6
Joined: 2010-04-12, 15:28 UTC

Post by *cool.bambus »

Thanks for your reply, Vochomurka.

Well, experimenting is not quite what I had in mind. I was looking for a quick feature to achieve this multi-opening easily.

Isn't this issue common to many people out there?

Thanks,
cool.bambus
User avatar
Vochomurka
Power Member
Power Member
Posts: 814
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

Look, I need to be happy. Folk, how to do it? Isn't this issue common to many people out there?

Just try %S. It would solve 70% of your problems.
Single user license #329241
PowerPro scripts for Total Commander
cool.bambus
Junior Member
Junior Member
Posts: 6
Joined: 2010-04-12, 15:28 UTC

Post by *cool.bambus »

Mmh, I think I don't get your point...
What am I expected to do with %S in this case?

Sorry, but it seems I need a dummy-proof description :-)

Thanks again,
cool.bambus
User avatar
Vochomurka
Power Member
Power Member
Posts: 814
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

Code: Select all

TOTALCMD#BAR#DATA
D:\Utils\Office\OFFICE11\WINWORD.EXE
%P%S
D:\Utils\Office\OFFICE11\WINWORD.EXE
WINWORD
D:\Utils\Office\OFFICE11\

-1
1) Select everything above (inside "Code" tags);
2) Press Ctrl+C (or Ctrl+Ins, or right mouse button -> Copy;
3) Find an empty space on any button bar of Total Commander;
4) Press right mouse button -> Paste;
5) You will see a new button. Most probably it would do nothing - do not press it now!
6) Mouse over this button, right mouse -> "Change...";
5) Edit D:\Utils\Office\OFFICE11\WINWORD.EXE to suit the real path to your Winword (I hope you have it installed);
6) Press OK;
7) Select some *.doc files on any Total Commander panel and press this button;
8 ) Enjoy.
Single user license #329241
PowerPro scripts for Total Commander
cool.bambus
Junior Member
Junior Member
Posts: 6
Joined: 2010-04-12, 15:28 UTC

Post by *cool.bambus »

Hi Vochomurka again,

thank you very much for your effort. And: Yes, it does work :-)

The only thing is: This way, I would have to create a new button for each program / filetype I'd like to open multiple files with... Excel, Word, text, csv, powerpoint, etc. etc....
So, it is quite tedious and not a generalized solution...

Any other hint from anybody?

Thanks,
cool.bambus
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Use an F4 File launcher, use a TC Internal Association, use a PowerPro script, or AHK Script, or the aforementioned LST2Multi, or the MultiFileOpen.cmd Script: which would be simplistic to add a couple lines to inspect the file extension of selected files so that specified programs would launch the files. Or even if one wanted to use the Windows Default programs for said extensions, then CMD.exe's START command could be used.

There are a plethora of ways to go about such a task, and you obviously haven't even attempted to look at the very robust help file or any of the detailed documentation that has accumulated on the boards over the years.
tcvol
Junior Member
Junior Member
Posts: 67
Joined: 2009-02-02, 12:35 UTC

Post by *tcvol »

it really depends on your scenario.
you could install f4menu and assign each extension to another program to launch.

e.g.
select 5 files, *.avi assigned to open with media player classic -> hit f4 -> 4 instances of mpc are opened

maybe you should describe your scenario in more detail.
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

cool.bambus,
Any other hint from anybody?
Select files, invoke right-click menu, click Open.

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.
seldonbilly
Junior Member
Junior Member
Posts: 3
Joined: 2010-04-21, 04:33 UTC

Post by *seldonbilly »

Thanks for the help; I am having a hard time making it do more than one at a time, but this should get you started. This works as long as the files are all in the same software, which is what I need. I never would have found that change to make. It will open several Excel files, but not one Excel and one Word file, and I can't remember whether I had that capability in XP, either.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Save as MultiFileOpenEXT.cmd (in system32 or a folder that is in the PATH env variable).
::
:: Overview: Launched via a TotalCommander Button:
:: --> Opens selected file by Windows default programs (uses START).
:: Command: cmd /c MultiFileOpenEXT.cmd
:: Parameters: %S

Code: Select all

@ECHO OFF 
SETLOCAL 
CLS 
::   REM Cursor is on [..] 
IF "%~1"=="" GOTO:EOF

:_LOOP 
SET isDir="%~a1" 
SET isDir=%isDir:~1,1% 

::   NOT A Directory, Open File 
IF NOT "%isDir%"=="d" ( 
   START "" "%~1"
) 
IF NOT "%~2"=="" ( 
   SHIFT 
   GOTO:_LOOP 
)
Venkman
Junior Member
Junior Member
Posts: 18
Joined: 2009-01-07, 14:47 UTC

Post by *Venkman »

cool.bambus wrote:Thanks for your reply, Vochomurka.

Well, experimenting is not quite what I had in mind. I was looking for a quick feature to achieve this multi-opening easily.

Isn't this issue common to many people out there?

Thanks,
cool.bambus
It is. I wondered, too, why I could not select a handful of, say .cpp files, press F4 and they would ALL open up within my favourite programmers editor. All the suggestions here are good, but I would love to have it work with F4, since that is using the file associations feature.

-Venkman
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

The editor needs to be able to accept the input from TC, depending on the editor in question it may need a command-line flag to indicate multiple files are following, or the files may need to be quoted.

For example, Flo's Notepad2 would require (on a button for example)
Command: C:\Program Files\Editors\Notepad2.exe +
Parameters: %P%S
Notice the "+".
Venkman
Junior Member
Junior Member
Posts: 18
Joined: 2009-01-07, 14:47 UTC

Post by *Venkman »

Thanks Balderstrom.

Do you by any chance know how to make the command line parameters %P%S work when setting up the editor for F4 (Configuration-Options-Edit/View).

There is a command line for invoking the editor, mine says "C:\Program Files\UltraEdit\uedit32.exe" (without the quotes)

Cheers,
Venkman
Post Reply