Is there a way of configuring XnView to launch an external program with the parameters of the currently selected files/directories?
Let’s say I want to run a specific, specialized program on several pictures. I would like to be able to select one or more files (and directories), and select a function (either via the menu, toolbar or context menu) which would be then passed via it’s command line the names of the files/directories selected.
Example: let’s say I want to run the program “C:\program files\fooBar.exe” on the files “1.jpeg”, “2.jpeg”, “8.jpeg”. I select the three files then I click on the custom “Foo Bar” function, and XnView would execute the command line “C:\program files\fooBar.exe 1.jpeg 2.jpeg 8.jpeg”.
This could be a versatile and easy way to customize XnView without having to deal with the hassle of compiling a DLL… (You could conceivably even link a batch file / bash script)…
Context menu/menu/toolbar icon to launch external program
Moderators: XnTriq, helmut, xnview
-
- Posts: 2
- Joined: Tue Aug 05, 2014 8:27 pm
-
- Moderator & Librarian
- Posts: 6447
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Context menu/menu/toolbar icon to launch external progra
- Go to Tools » Options... » Toolbar » Buttons » Buttons displayed » Browser
- Click on Append.
- Enter the path to the program's EXE.
- Command: [ C:\Progra~1\fooBar.exe ]
- Icon file: [ C:\Progra~1\fooBar.exe ]
-
- Posts: 2
- Joined: Tue Aug 05, 2014 8:27 pm
Re: Context menu/menu/toolbar icon to launch external progra
Oh cool! Thanks! Just what I need.
But on XnViewMP, you have to go to Tools → Settings → Interface → Toolbar, then add a “-- COMMAND --”, then click on the “Set Label…” button to set the label, click on the “Set command…” to set the command, and “Set Icon…” to set the icon.
The only thing is that it won’t work for a whole directory…
But on XnViewMP, you have to go to Tools → Settings → Interface → Toolbar, then add a “-- COMMAND --”, then click on the “Set Label…” button to set the label, click on the “Set command…” to set the command, and “Set Icon…” to set the icon.
The only thing is that it won’t work for a whole directory…

-
- Moderator & Librarian
- Posts: 6447
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Context menu/menu/toolbar icon to launch external progra
<-- Moderator's note: This topic has been moved from “Contribution | Customization” to “XnView MP | MP - General Support”. -->
You can tell XnView's browser to Show all files (recursive) from the context menu of a directory in the folder tree.emdx wrote:The only thing is that it won’t work for a whole directory…