How to open multiple files at once?

English support forum

Moderators: white, Hacker, petermad, Stefan2

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: 13081
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
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Haven't used UltraEdit since v9 or 10, so I don't recall any of its possible line-command syntax -- but that should be in its helpfile. I use EmEdit primarily now, sometimes NotePad2 or Ted'sNotepad for single-file quick Edits or Regex replaces.

NotePad2 is an absolute pain when it comes to opening files, thats where/when MultiFileOpen.cmd first came into existence.
Whereas EmEdit doesn't need any line-command specifics, nor does it even need the full %P%S.

The following Button works w/ EmEdit:
Command: "C:\Program Files\EmEditor\EmEditor.exe"
Params: %S

Which is cool, considering usually you need to invoke a cmd.exe window to be able to pass programs the filename only w/o the leading full path.
Venkman
Junior Member
Junior Member
Posts: 18
Joined: 2009-01-07, 14:47 UTC

Post by *Venkman »

EDIT - didnt read the reply above. I'll set up my own button, thanks.

To pinpoint my issue: If I select three files and drag them down onto the F3 button (lower left of the TC window), they all go into Lister and I can toggle through them with N.

If I do the same thing and drag the files onto the F4 button, only one of them open up in my editor. I would love to get all three as tabbed files, in stead.

Can anyone help, please?

-V
Venkman
Junior Member
Junior Member
Posts: 18
Joined: 2009-01-07, 14:47 UTC

Post by *Venkman »

Allright - got it working. Thanks to all who provided input. This is my button definition:

Command: c:\Program Files\UltraEdit\uedit32.exe
Parameters: %S
Icon File: C:\Program Files\UltraEdit\uedit32.exe
Tooltip UltraEdit

I can now select a set of files, and then press this button. The files will now all open up in UltraEdit in tabs. Drag&drop does not work, only one of the files open up if I drag the set of files onto the button.

Nice solution, just too bad F4 does not provide the same functionality as F3.

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

Post by *Vochomurka »

What about search?
Try OpenFileTC or ChoiceEditor
Single user license #329241
PowerPro scripts for Total Commander
Venkman
Junior Member
Junior Member
Posts: 18
Joined: 2009-01-07, 14:47 UTC

Post by *Venkman »

Thanks for the suggestion.

I tested OpenFileTC, but I had some problems. If I selected, say, 5 files that I had associated to ultraedit in the tool, then pressing F4 would sometimes not open up UE with the selected files. If I then marked just a single file and press F4, UE opens up with the 5 files that I had tried opening up previously.

Cheers,
Venkman
Post Reply