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

Run different actions for different watched (hot) folders

Post by jboeck »

Hi together,
hopefully i´ll be able to describe my issue:
I want to add 4 watched (or hot) folders to reduce the measures and file-size from .jgp that will be copied into these folders.

Folder 1 should generate Size-S-files like 640 x 480 px
Folder 2 should generate Size-M-files like 1280 x 960 px
Folder 3 should generate Size-L-files like 1600 x 1200 px
Folder 4 should generate Size-XL-files like 2048 x 1536 px

Output can be a sub-folder or ONE output-folder for all 4 hot folders. My problem is not to configure the output result, my problem is
to tell XnConvert to do create different file-sizes depending on the folder the original file was copied to.

Would be thankful for any idea or solution.
If you have further questions or need another description of my issue please ask or answer here.
THX
cday
XnThusiast
Posts: 3481
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: different actions for different watched / hot folders

Post by cday »

I am reasonably sure that, not surprisingly, that is not currently supported! :wink:

However, I think you might be able to achieve the result you need by using four instances of XnConvert, each configured to monitor one hot folder and to then produce the required output files... You would probably need to use four ZIP portable instances suitably configured, I think. :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 »

Thanks for that. Using four instances might be a solution. :D
Is there a way create four auto-start-shortcuts starting with the four configured profiles?
The PC restarts automatically every 24 hours at night so I cant start the four instances every day "by hand".

My first test starting two instances from two unpacked zip-folders was not successful :|
Both instances mapped to the same folder.
cday
XnThusiast
Posts: 3481
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: Tue Feb 15, 2022 2:58 pm Is there a way create four auto-start-shortcuts starting with the four configured profiles?
The PC restarts automatically every 24 hours at night so I cant start the four instances every day "by hand".
XnConvert can be set up on the Settings tab to load the last script used on startup, so the problem reduces to starting the instances automatically, and I have no knowledge on that.
rmatthew
Posts: 2
Joined: Sun Feb 20, 2022 10:43 pm

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

Post by rmatthew »

I haven't put a ton of time into thinking about this (will do some more) but my "after 30 seconds of thinking" solution would look something like the following -

Using Hazel for Mac (amazing program on its own) set up 4 watched (maybe instead of in XnConvert or in conjunction with) folders within Hazel. When a certain action is triggered ie.:
- New image file added
- X number of image files added
- X amount of time has gone by since image files added
- Something of these sorts
then run either a script file written in Automator or simply run a XnConvert Preset to run XnConvert and process the files.

I think I remember seeing a "Run Hot Folders Automatically" and a Close XnConvert when done options. By using these you would start the program, run the files and then shut it down to be ready for the next set of files to hit any of the 4 folders.

Like I said, will think a bit more but hopefully this gives us a general direction to go and play with. Good luck. R.

Hazel link - https://www.noodlesoft.com
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 »

Thanks rmatthew for taking your time to think about it.
If I would own a Mac I could try ... but I don´t :( :?
cday
XnThusiast
Posts: 3481
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: Tue Feb 15, 2022 2:58 pm My first test starting two instances from two unpacked zip-folders was not successful :|
Both instances mapped to the same folder.
I don't know whether that was an edit but I didn't see that originally.

In XnView MP it is possible to select the paths used for program data to the program folder, but I don't see an option to do that in XnConvert... :(

As XnConvert is essentially the batch convert function of XnView MP, you could try using multiple instances of that software, with the paths option set to Program (XnView). The settings are at Tools > Settings... > Integration -- Paths.
rmatthew
Posts: 2
Joined: Sun Feb 20, 2022 10:43 pm

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

Post by rmatthew »

jboeck wrote: Mon Feb 21, 2022 7:15 am Thanks rmatthew for taking your time to think about it.
If I would own a Mac I could try ... but I don´t :( :?
There are probably some "Hazel Like" programs you could use. Try a google search...
cday
XnThusiast
Posts: 3481
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: Tue Feb 15, 2022 2:58 pm My first test starting two instances from two unpacked zip-folders was not successful :|
Both instances mapped to the same folder.
Do you mean that only one Hot folder was monitored, which would suggest that the second XnConvert instance overwrote the Hot folder address set by the first XnConvert instance?
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: Mon Feb 21, 2022 12:19 pm
Do you mean that only one Hot folder was monitored, which would suggest that the second XnConvert instance overwrote the Hot folder address set by the first XnConvert instance?
Correct cday, that´s what I was trying to explain. I started two .exe-Files from different folders but both instances "looked" into the same hot-folder.
cday
XnThusiast
Posts: 3481
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: Mon Feb 21, 2022 12:28 pm
cday wrote: Mon Feb 21, 2022 12:19 pm
Do you mean that only one Hot folder was monitored, which would suggest that the second XnConvert instance overwrote the Hot folder address set by the first XnConvert instance?
Correct cday, that´s what I was trying to explain. I started two .exe-Files from different folders but both instances "looked" into the same hot-folder.
Pierre?

Are the ZIP version program settings, in this case the Hot folder path, not stored in the program folder?
User avatar
xnview
Author of XnView
Posts: 38830
Joined: Mon Oct 13, 2003 7:31 am
Location: France

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

Post by xnview »

jboeck wrote: Mon Feb 21, 2022 12:28 pm Correct cday, that´s what I was trying to explain. I started two .exe-Files from different folders but both instances "looked" into the same hot-folder.
You use 2 different .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: Mon Feb 21, 2022 7:08 pm You use 2 different .ini?
Thanks for your reply Pierre. I didn’t find a ini-file inside the zip-folder or a description to save the settings into an ini-file.
Where do I have to safe the ini to? Do you have a example-ini? So I could try to change it for needs.
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: Mon Feb 21, 2022 7:08 pm You use 2 different .ini?
Thanks for your reply Pierre. I didn’t find a ini-file inside the zip-folder or a description to save the settings into an ini-file.
Where do I have to safe the ini to? Do you have a example-ini? So I could try to change it for needs.
User avatar
xnview
Author of XnView
Posts: 38830
Joined: Mon Oct 13, 2003 7:31 am
Location: France

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

Post by xnview »

By default the xnconvert.ini is in c:\users\...\appdata\roaming\xnconvert
Pierre.