Folders and subfolders (Recursion)

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

Moderators: XnTriq, helmut, xnview

cday
XnThusiast
Posts: 4172
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Folders and subfolders (Recursion)

Post by cday »

If you use:

Code: Select all

-o C:\temp\%%.jpg
??
anfvan6
Posts: 10
Joined: Sun Mar 22, 2020 2:11 pm

Re: Folders and subfolders (Recursion)

Post by anfvan6 »

cday wrote: Sat Dec 04, 2021 12:07 pm If you use:

Code: Select all

-o C:\temp\%%.jpg
??
it works
thanks
mdnava
Posts: 15
Joined: Fri Mar 06, 2020 8:08 pm

Re: Folders and subfolders (Recursion)

Post by mdnava »

Is there a way to disable folder recursion?

I use NConvert to convert and/or resize images from Windows context menus. After an update, last week by mistake I missed the click to a file I intended to change and a couple hours later I noticed there was a NConvert process running.. It was in the process of irreversibly modify images in every subfolder in the Desktop. I had no idea why this happened since I've never had such a problem.

Recursion can be useful as an option, but I find it very disturbing that this feature is enabled by default.. :shock:
This will most likely cause irreversible data loss for users.
cday
XnThusiast
Posts: 4172
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Folders and subfolders (Recursion)

Post by cday »

mdnava wrote: Fri Feb 11, 2022 9:38 pm Is there a way to disable folder recursion?

I use NConvert to convert and/or resize images from Windows context menus. After an update, last week by mistake I missed the click to a file I intended to change and a couple hours later I noticed there was a NConvert process running... It was in the process of irreversibly modify images in every subfolder in the Desktop. I had no idea why this happened since I've never had such a problem.

Recursion can be useful as an option, but I find it very disturbing that this feature is enabled by default.. :shock:
This will most likely cause irreversible data loss for users.

I checked the help file for the new NConvert 7.98 and didn't see a recursion option, so recursion does seem to be enabled by default. Thinking about it, that seems appropriate as normally when the input file term requires recursion to produce the intended result it will be applied, and when recursion is not required it will not occur.

But your concern relates to a possible unintended misselection? The way I use NConvert that shouldn't occur, as I am able to check the code to be run carefully before running it, but you are selecting the input file through a (right?) click which could much more easily result in a misselection?

If the risk is real a possible solution might be as you imply to add an option to enable recursion (or possibly to disable it). Or possibly to provide an alert and require confirmation before the code is run?
mdnava
Posts: 15
Joined: Fri Mar 06, 2020 8:08 pm

Re: Folders and subfolders (Recursion)

Post by mdnava »

cday wrote: Mon Feb 14, 2022 8:01 pm But your concern relates to a possible unintended misselection? The way I use NConvert that shouldn't occur, as I am able to check the code to be run carefully before running it, but you are selecting the input file through a (right?) click which could much more easily result in a misselection?

If the risk is real a possible solution might be as you imply to add an option to enable recursion (or possibly to disable it). Or possibly to provide an alert and require confirmation before the code is run?
Yes, but more than that. I use NConvert from context menus. I have for years now. You cannot select all files you want to convert because there's a limit to the length of the arguments you can pass to any program in Windows. So I just right click in the folder background and the context menu sends the folder to NConvert so all files are converted. But, now, if there are any subfolders they will all get irreversibly converted as well.

There should be either option. To enable or disable recursion.

I think I'm gonna roll back to a version without this issue for the time being.
If I want recursion I'll just call the newer version.
kayww
Posts: 1
Joined: Sat Apr 16, 2022 7:59 pm

Re: Folders and subfolders (Recursion)

Post by kayww »

Hello. I joined to comment and agree with "mdnava" regarding recursion.

I use the GUI and open it with a command from within XYplorer by right-clicking on a folder to open the image files in XnConvert. I can switch to NConvert, but I do like using the GUI. Currently, all the images in the subfolders are processed and I do not want them processed. I would like an option to "ignore subfolders". It would also be helpful to have an option to "move all original files into a subfolder" as I have to do that manually after the conversion is done (this is a separate request).

Thank you.