Plugin for Passing 'Ctrl+S' File List to External Command?

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
romulous
Senior Member
Senior Member
Posts: 226
Joined: 2003-11-19, 04:10 UTC

Plugin for Passing 'Ctrl+S' File List to External Command?

Post by *romulous »

Does anyone know if such a beastie exists? As an example, I have a folder full of images (say 100), and those images are associated with IrfanView. I hit Ctrl+S, type in *test* - and only the files with 'test' in the name are shown (say 6). All good so far. Now, assume these files are not one after the other in the folder (due to their filenames, they are in various different spots in the folder).

So, how do I open just those filtered files? Well - and this is what I currently do - I could double click the first one, then close IrfanView, then double click the second one, close IrfanView etc. What I would like to actually do is for TC to pass just these filtered files through to the external program, so when I double click the first in IrfanView, instead of it showing that there are 100 files in the folder, there are only 6 (allowing me to scroll through just those).

I thought Virtual Panel might have been able to do what I wanted, but I tried it, and IrfanView still shows the full folder of images, not the small set I copied into the panel from TC.
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

There are several posibilities:
- use F3 and the key "n" to swap between the images
- copy them to a temp folder and open them from there
- mark the files and use toolbar parameters like %P%S (if the program supports them / AFAIK IrfanView doesn't support them.)
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Virtual Panel won't help to see images via IfranView since Virtual Panel is TC only feature.

The only way to see just marked files - is to create filelist and pass it to viewer. But you need a viewer that supports filelists of course.
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3378
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

As you use Irfanview this is EASY solvable without any Plugin with just a Button:

Copy this Button and put it onto your Button-Bar

Code: Select all

TOTALCMD#BAR#DATA
cmd.exe
/C copy /y "%L" "%P\pictures.txt" & %%Commander_Path%%\Tools\Multimedia\IrfanView\i_view32.exe  /filelist="%P\pictures.txt"
%Commander_Path%\Tools\Multimedia\IrfanView\i_view32.exe,2
Create a Picturelist and call IrfanView

-1
-1
mark the wanted Pictures and press this Button.
Whats happening?
1. TC creates a filelist with all the selected pictures into your temp-folder
(will be deleted when TC is closed)
2. The filelist is copied into the Image folder as file "pictures.txt"
3. Irfanview is called with the param "/filelist" and your "pictures.txt"

What to do:
Change the Path to Irfanview like it is on YOUR system.

HTH


Samuel wrote: - mark the files and use toolbar parameters like %P%S (if the program supports them / AFAIK IrfanView doesn't support them.)
How about informing yourself before posting that???
irfanview help wrote: Beispiel für filelist:

i_view32.exe /filelist=c:\mypics.txt
i_view32.exe /filelist=c:\mypics.txt /convert=d:\test\*.jpg
i_view32.exe /filelist=c:\mypics.txt /thumbs
Hoecker sie sind raus!
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, Sir_SiLvA.

To the best of my knowledge %P%S will be expanded by Total Commander to path\file1 path\file2 ... path\fileN and all these filenames will be passed by T.C. to the programme you launch as commandline arguments.
This is what Samuel talked about and stated that Irfanview were not able to handle the result of %P%S.

What you are using is %L, a file holding all the filenames path\file1, path\file2 ... path\fileN - one per line. You pass this file to Irfanview and Irfanview can handle such a listfile.

In short word %P%S and %L are different approaches aiming to achieve the same goal.

Any particular reason why you do not allow T.C. to pass %L directly to Irfanview, but instead pass a copy of %L to Irfanview?

Anyway, coming back to the initial question whether a plugin existed: a plugin is not really needed for either approach:
+ passing a filelist on the commandline to a programme (%P%S)
+ passing a listfile holding the filelist to a programme (%L)

Cheers,
Karl
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3378
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

karlchen wrote:Any particular reason why you do not allow T.C. to pass %L directly to Irfanview, but instead pass a copy of %L to Irfanview?
Nope only for the case the op needs to work with the same files again.
And I understand Samuel that he claimd that no Params at all could be passed...
Hoecker sie sind raus!
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

No, I knew IrfanView can accept parameters. I was just too lazy to look them up, but couldn't imagine it could open only files from a list. (you proved me wrong here.)

Thanks for the info.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Here's my button for IrfanView,
just select the files you want - even in subdir branch view.

Code: Select all

TOTALCMD#BAR#DATA
%gImageView%\IrfanView\i_view32.exe
/filelist=%L
%gImageView%\IrfanView\i_view32.exe
IV: FileList.txt
%gImageView%\IrfanView\
0
-1
gImageView is just an environment var for imageTools base dir.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
Post Reply