## NConvert: Disable folder recursion?

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

mdnava
Posts: 7
Joined: Fri Mar 06, 2020 8:08 pm

### NConvert: Disable folder recursion?

Hi..

How can I disable folder recursion in NConvert?.

viewtopic.php?p=175783#p175783
viewtopic.php?p=175684#p175684

Having recursion enabled by default seems to me more like a bug than a feature. And a very dangerous one. I actually irreversibly lost data because I upgraded from v7.80 to v7.94 (as I normally upgrade) and kept using it as always. I had been using NConvert for years from Windows context menus to convert images in folders. One time I converted a few files I had on the Desktop. A couple hours later I noticed a NConvert process was still running. By the time I killed it thousands over thousands of images I had in Desktop subfolders were already altered. This was not intended.

If there's no option to disable recursion, I think there should either be an option to disable it, or (even better) have it disabled by default and add an option to use recursion by choice (when needed). I do think that having recursion enabled by default is dangerous.

I'm still using v7.80 and missing new features because of this issue.

I'd appreciate any comments on this..

Best regards.. :)
cday
XnThusiast
Posts: 3484
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

### Re: NConvert: Disable folder recursion?

+1 I agree that the new recursion option default should disabled.

Both for compatibility with existing code, and to avoid unexpected and possibly seriously undesirable results from new code.

An emergency update should possibly be considered!
xnview
Author of XnView
Posts: 38837
Joined: Mon Oct 13, 2003 7:31 am
Location: France

### Re: NConvert: Disable folder recursion?

when using which command line?
Pierre.
cday
XnThusiast
Posts: 3484
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

### Re: NConvert: Disable folder recursion?

xnview wrote: Mon Sep 12, 2022 12:06 pm when using which command line?
I would think any command line that NConvert supports on which recursion would occur automatically with the current option, I only use NConvert on Windows cmd.exe, I am not into scripting on Linux yet.

I don't know which command line the OP uses?
cday
XnThusiast
Posts: 3484
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

### Re: NConvert: Disable folder recursion?

Further:

Surely NConvert behaviour must be the same in any operating system or command line, so that the same documentation/help file is applicable?

And since unexpected application of recursion may, as reported, have very undesirable consequences, surely a recursion switch that enables recursion is needed: if the switch is not included in the code run operation will be as before...
mdnava
Posts: 7
Joined: Fri Mar 06, 2020 8:08 pm

### Re: NConvert: Disable folder recursion?

xnview wrote: Mon Sep 12, 2022 12:06 pm when using which command line?
There are several different commands I use from context menus or tools, in the case of the issue I had I believe it had happened several times before, but I finally noticed something was happening after I saw the nconvert process still running after a couple hours, even though there were only a few files to convert. The executed command should've been something like this (could've been somewhat different, the final command is set by scripts):

Code: Select all

\$ nconvert.exe -rtype lanczos -rmeta -D -resize longest 1200 D:\path\to\dir 
As I mentioned, I use it on context menus and quick & dirty personal tools.. I attach some examples..

2022-09-13 01.48.08b.jpg
2022-09-13 01.37.21.png
You do not have the required permissions to view the files attached to this post.
xnview
Author of XnView
Posts: 38837
Joined: Mon Oct 13, 2003 7:31 am
Location: France

### Re: NConvert: Disable folder recursion?

i'll add -recurse (off by default)
Pierre.
cday
XnThusiast
Posts: 3484
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

### Re: NConvert: Disable folder recursion?

xnview wrote: Thu Sep 22, 2022 6:39 am i'll add -recurse (off by default)
mdnava
Posts: 7
Joined: Fri Mar 06, 2020 8:08 pm

### Re: NConvert: Disable folder recursion?

xnview wrote: Thu Sep 22, 2022 6:39 am i'll add -recurse (off by default)
Thank you!
I believe that's the better option.

I wouldn't want to overreach, but please consider adding support for JPEG XL in NConvert.
I'm kind of gravitating towards that format.

Best regards!