Run different actions for different watched (hot) folders

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderators: XnTriq, helmut, xnview

jboeck
Posts: 10
Joined: Tue Feb 15, 2022 12:32 pm
Location: Germany

Re: Run different actions for different watched (hot) folders

Post by jboeck »

xnview wrote: Tue Feb 22, 2022 8:25 am By default the xnconvert.ini is in c:\users\...\appdata\roaming\xnconvert
Can I change the default-path or tell xnconvert another location to configure 4 different ini´s?
User avatar
xnview
Author of XnView
Posts: 44922
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Run different actions for different watched (hot) folders

Post by xnview »

you can start xnconvert -ini file.ini
Pierre.
jboeck
Posts: 10
Joined: Tue Feb 15, 2022 12:32 pm
Location: Germany

Re: Run different actions for different watched (hot) folders

Post by jboeck »

xnview wrote: Tue Feb 22, 2022 12:48 pm you can start xnconvert -ini file.ini
Thanks. That should solve my issue :D
jboeck
Posts: 10
Joined: Tue Feb 15, 2022 12:32 pm
Location: Germany

Re: Run different actions for different watched (hot) folders

Post by jboeck »

xnview wrote: Tue Feb 22, 2022 12:48 pm you can start xnconvert -ini file.ini
Me again :?
where is my mistake: "C:\Program Files\XnConvert-01-S\xnconvert.exe" /-ini size-s.ini
There are two .ini-file in the folder C:\Users\xyz\AppData\Roaming\XnConvert but only the xnconvert.ini is used.
cday
XnThusiast
Posts: 4186
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Run different actions for different watched (hot) folders

Post by cday »

jboeck wrote: Wed Feb 23, 2022 3:47 pm
xnview wrote: Tue Feb 22, 2022 12:48 pm you can start xnconvert -ini file.ini
Me again :?
where is my mistake: "C:\Program Files\XnConvert-01-S\xnconvert.exe" /-ini size-s.ini
There are two .ini-file in the folder C:\Users\xyz\AppData\Roaming\XnConvert but only the xnconvert.ini is used.
This is new to me too but I would assume that you may need to specify the full path to each ini, and that possibly an ini will be created at the specified location when the program is run. But some trial and error might be needed to test different possible solutions.

And that you can probably place each ini where you wish, in the relevant XnConvert folder or anywhere in the file system you have created.

Otherwise, you will probably have to wait for Pierre...
jboeck
Posts: 10
Joined: Tue Feb 15, 2022 12:32 pm
Location: Germany

Re: Run different actions for different watched (hot) folders

Post by jboeck »

cday wrote: Wed Feb 23, 2022 4:20 pm This is new to me too but I would assume that you may need to specify the full path to each ini, and that possibly an ini will be created at the specified location when the program is run. But some trial and error might be needed to test different possible solutions.

And that you can probably place each ini where you wish, in the relevant XnConvert folder or anywhere in the file system you have created.
The complete path leads to the same result as before. --> xnconvert.ini is used

"C:\Program Files\XnConvert-01-S\xnconvert.exe" /-ini C:\Users\xyz\AppData\Roaming\XnConvert\size-s.ini
cday
XnThusiast
Posts: 4186
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Run different actions for different watched (hot) folders

Post by cday »

This code run at the command prompt opens an instance of XnConvert:

C:\Users\Me>C:\A\XnConvert_1\xnconvert.exe -ini C:\Users\Me\AppData\Roaming\XnConvert\XnConvert_1.ini

XnConvert_1.ini is updated as it should be when the opened application is closed. Maybe you can work back to deduce what I did, I'm not entirely sure myself so some trial and error may be necessary. I hate leaving Linux and booting into Windows 10.

I think this could if necessary be tidied up and possibly serve as a model for a multi-instance version.

I used the ZIP download but am not sure if that matters for the current XnConvert version.

Multiple instances could probably be launched if required using a batch file.

Hint:

Each time a new XnConvert instance is run and then closed opened a new xnconvert.ini file will be created in .../roaming: that file can then be renamed and used as above to open that XnConvert instance.
aiujb89
Posts: 2
Joined: Wed Mar 16, 2022 5:40 pm

Re: Run different actions for different watched (hot) folders

Post by aiujb89 »

This thread describes exactly what I need to do routinely also... We take one master photoshop file, saved as an 1800x1800px PSD file.
From there, I need 6 renditions created, and put into a single folder:
  • [Filename]-en-US-1800px-01.png
    [Filename]-en-US-690px-01.png
    [Filename]-en-US-480px-01.png
    [Filename]-en-US-360px-01.png
    [Filename]-en-US-267px-01.png
    [Filename]-en-US-150px-01.png
So, it would be necessary for the software to be able to configure:
Action
Output
Action
Output
Action
Output... etc.
rather than completing all actions, then completing a single output.

The Actions that we previously used with Mac Automator, which did it masterfully was RobotPhotoshop by Ben Long, which unfortunately was abandoned in 2017 and no longer works with current Mac OS versions.

For a future feature, please consider combining the Input steps with the Output steps so the user can decide what order to use them in. Then I could stack the Input/Output tasks repetitively to accomplish this task.

Thanks!
User avatar
xnview
Author of XnView
Posts: 44922
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Run different actions for different watched (hot) folders

Post by xnview »

aiujb89 wrote: Wed Mar 16, 2022 5:55 pm For a future feature, please consider combining the Input steps with the Output steps so the user can decide what order to use them in. Then I could stack the Input/Output tasks repetitively to accomplish this task.
but what would be the best way to stack Action/Output in the UI?
Pierre.
aiujb89
Posts: 2
Joined: Wed Mar 16, 2022 5:40 pm

Re: Run different actions for different watched (hot) folders

Post by aiujb89 »

The software we previously used allowed us to "drag" either an input or an output into a "queue". So we could add 3 inputs, then an output. Then another input, then an output, for example.

The other option is to allow multiple "outputs" in the queue at the same time. So, after the inputs have all run, then it will run multiple outputs in order, each delivering a specific file format & name into folder(s) specified.
User avatar
xnview
Author of XnView
Posts: 44922
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Run different actions for different watched (hot) folders

Post by xnview »

something like that?
Clipboard-1.jpg
You do not have the required permissions to view the files attached to this post.
Pierre.
cday
XnThusiast
Posts: 4186
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Run different actions for different watched (hot) folders

Post by cday »

There have been regular requests to enhance XnConvert to provide a way of creating multiple output versions from a set of inputs, a common need case being to enable output of alternative versions with different pixel dimensions for use on the web.

The possibility of adding an Output action has been suggested before and discussed, but wasn't proceeded with at the time.

At a quick look, and without rereading the above thread which identified some possible limitations of an Output action, xnview's proposal above looks as if it might be worth some detailed consideration. One limitation, though, is that successive outputs could normally only be created from the preceding image, which would to some extent reduce the generality of the method.

Recognising the unfulfilled need for a solution, I have recently been thinking about an alternative possible interface which would, if it can be implemented, enable completely unrestricted output of multiple versions of a set of inputs, and importantly do so in a way that would not change the present, very attractive and intuitive design of the tool when it is used in the present way.

The idea does depend on it being possible for activation of a setting on (for example) the Settings tab to change the already-open user interface so as to open a panel that could contain whatever controls are required to configure multiple alternative actions and outputs: those controls are a detail, and I can see alternative possible detail design options, the immediate question is whether there would be any "show-stopper" that would prevent implementation?


XnConvert_Open_Multiple_Output_Settings_Panel.png

The required multiple output controls would be placed on the new interface area on the right: the question is, can the interface of an opened program be changed to add a new panel to the right... :?:
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 44922
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Run different actions for different watched (hot) folders

Post by xnview »

cday wrote: Mon May 02, 2022 7:54 pm The required multiple output controls would be placed on the new interface area on the right: the question is, can the interface of an opened program be changed to add a new panel to the right... :?:
But in this case you can select multiple output but not multiple actions list (resize 50%, Resize 75%, ...)
Pierre.
cday
XnThusiast
Posts: 4186
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Run different actions for different watched (hot) folders

Post by cday »

Thinking about this idea recently, I started considering how an interface that would allow multiple, completely independent, actions and output 'threads' processing the same input files, might be configured. But I wasn't sure whether it was possible to expand an already open interface?

I had some outline ideas on possible alternative interface designs, but delayed posting them as I thought you would currently be fully occupied perfecting XnView MP... :D

If you can confirm that an open XnConvert window could be expanded as illustrated above, I will post some initial thoughts when I have time.

To recap: When the existing standard XnConvert interface is open, on selection of a new setting, the expanded interface above with suitable configuration controls added would open. And when finished running the configured multiple parallel 'threads', changing the same setting would restore the standard XnConvert interface.
User avatar
xnview
Author of XnView
Posts: 44922
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Run different actions for different watched (hot) folders

Post by xnview »

cday wrote: Tue May 03, 2022 11:35 am To recap: When the existing standard XnConvert interface is open, on selection of a new setting, the expanded interface above with suitable configuration controls added would open. And when finished running the configured multiple parallel 'threads', changing the same setting would restore the standard XnConvert interface.
i don't see :)
Pierre.