Batch convert -- Saving output to a relative folder

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, helmut, xnview

User avatar
winnylinny
Posts: 146
Joined: Fri Apr 17, 2020 5:35 pm

Batch convert -- Saving output to a relative folder

Post by winnylinny »

A tooltip or explanation needs to more clearly offer a hint when selecting an output folder under Batch Convert.

I didn't even know this was possible, until I found out by mistake!

I kept using the "source folder" option, because I did not want to save my converted files to the same folder on my drive every time. Images exist in different albums and folders, so I was hoping there was a way to save the converted files into a relative output folder.

Guess what? It's possible! I just never knew because it was not explained! :shock:

This works on Linux, and Windows. New users might not know that XnViewMP's batch convert even supports "relative output folder" since no hints are provided. :P


- - -

EDIT: Here is what it could look like, based on the conversation between myself, cday, and user0.

Checkbox selected
subfolder-option-selected.png

Checkbox deselected
subfolder-option.png


XnViewMP already supports this, but you have to "trick" the "Folder" selection. :wink:

This is a better method, and it is more clear for the user.
You do not have the required permissions to view the files attached to this post.
Last edited by winnylinny on Thu Feb 09, 2023 9:36 pm, edited 5 times in total.
cday
XnThusiast
Posts: 3888
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Batch convert -- Saving output to a relative folder

Post by cday »

An interesting discovery, possibly not an intended option...? :wink:

Regarding syntax, mightn't a 'slash' be more intuitive, accept either '/' or '\', for example /converted ?

Out of interest, if the named folder does not already exist, is it possibly created automatically when needed?

Regarding documentation, for a developer testing is boring, documentation is even more boring, so volunteers are always welcome... :D
User avatar
winnylinny
Posts: 146
Joined: Fri Apr 17, 2020 5:35 pm

Re: Batch convert -- Saving output to a relative folder

Post by winnylinny »

cday wrote: Mon Jan 23, 2023 3:44 pm Out of interest, if the named folder does not already exist, is it possibly created automatically when needed?
Yes. If the folder does not exist, it is automatically created. :)

In fact, you can even specify a further nested relative output folder, such as:
  • converted/webp
  • converted/jpg
  • converted/png
It works as you expect: It will save the newly converted files two folders down relative from the source folder.

This has beautifully improved my workflow. I wish I knew about this feature much earlier! :mrgreen:

I believe more users will benefit if they knew about this feature in Batch Convert.


cday wrote: Mon Jan 23, 2023 3:44 pm Regarding syntax, mightn't a 'slash' be more intuitive, accept either '/' or '\', for example /converted ?
Leading slashes denote an absolute path. This will attempt to save it to the root of the filesystem. This is why if you use the "browse" button to select the output folder, it will use the complete absolute path, which leads with a slash. (In Windows, this is the equivalent of typing C:\converted )
cday
XnThusiast
Posts: 3888
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Batch convert -- Saving output to a relative folder

Post by cday »

winnylinny wrote: Mon Jan 23, 2023 3:57 pm This has beautifully improved my workflow. I wish I knew about this feature much earlier! :mrgreen:
Maybe Pierre does too? :D

cday wrote: Mon Jan 23, 2023 3:44 pm Regarding syntax, mightn't a 'slash' be more intuitive, accept either '/' or '\', for example /converted ?
Leading slashes denote an absolute path. This will attempt to save it to the root of the filesystem. This is why if you use the "browse" button to select the output folder, it will use the complete absolute path, which leads with a slash. (In Windows, this is the equivalent of typing C:\converted )
Either slash would be incorrect? A slash is normally used in the path to a subfolder?
User avatar
winnylinny
Posts: 146
Joined: Fri Apr 17, 2020 5:35 pm

Re: Batch convert -- Saving output to a relative folder

Post by winnylinny »

cday wrote: Mon Jan 23, 2023 5:17 pm Maybe Pierre does too? :D
It's a great feature, and should remain! Accident or not.
Either slash would be incorrect? A slash is normally used in the path to a subfolder?
Any slash put in the beginning of a path is considered "start from the root of the filesystem". Whereas, if you begin with the folder name (without a leading slash), it is interpreted as "start from the current directory".

Any slashes that come later are considered part of the absolute or relative path.



Some examples, if the source folder is /home/cday/Pictures/batch


Typing in /converted will save the converted files into:
  • /converted


Typing in converted will save the converted files into:
  • /home/cday/Pictures/batch/converted


Typing in /home/cday/Pictures/batch/converted will save the converted files into:
  • /home/cday/Pictures/batch/converted


Typing in converted/webp will save the converted files into:
  • /home/cday/Pictures/batch/converted/webp
Last edited by winnylinny on Mon Jan 23, 2023 9:00 pm, edited 2 times in total.
cday
XnThusiast
Posts: 3888
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Batch convert -- Saving output to a relative folder

Post by cday »

Thanks for the paths explanation, I think that my reasoning was that the Source folder part of the path was implied, so that /converted/some_folder with the slash would be logical. Never mind though, you have now documented a previously undocumented feature that might be useful to others. :D
User avatar
winnylinny
Posts: 146
Joined: Fri Apr 17, 2020 5:35 pm

Re: Batch convert -- Saving output to a relative folder

Post by winnylinny »

cday wrote: Mon Jan 23, 2023 7:55 pm Never mind though, you have now documented a previously undocumented feature that might be useful to others. :D
That's why I think a clear explanation or tooltip or "hint" should be printed on this page. It can help more people.


(FYI: I made some REALLY BAD TYPOS in my previous post. :shock: I've correct them!)
User avatar
winnylinny
Posts: 146
Joined: Fri Apr 17, 2020 5:35 pm

Re: Batch convert -- Saving output to a relative folder

Post by winnylinny »

I can confirm this works the same in Windows too. :D

I think this should either be:

(1) communicated more clearly (tooltip and description) as I wrote above in my original post

or

(2) a third option should be added to the "Output folder" settings:
  • Source folder
  • Subfolder in source location
  • Folder
The middle option (my feature request), you would type in the name of this subfolder. Choosing this option will place all the converted files into a subfolder from where the source files exist. (This is the same thing as what is already possible that I explained in my original post.)

So for example, if you select "Subfolder in source location", then type "converted" into the text field, all the converted images will be placed into the source location under a subfolder named "converted".
cday
XnThusiast
Posts: 3888
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Batch convert -- Saving output to a relative folder

Post by cday »

winnylinny wrote: Fri Feb 03, 2023 12:13 am (2) a third option should be added to the "Output folder" settings:
  • Source folder
  • Subfolder in source location
  • Folder
The middle option (my feature request), you would type in the name of this subfolder. Choosing this option will place all the converted files into a subfolder from where the source files exist. (This is the same thing as what is already possible that I explained in my original post.)

So for example, if you select "Subfolder in source location", then type "converted" into the text field, all the converted images will be placed into the source location under a subfolder named "converted".
I would suggest the following detail change:
  • Source folder
  • Source folder subdirectory (or Source folder - Subdirectory)
  • Folder
Otherwise an interesting suggestion that I expect could be easily implemented... :D

The existing Source folder operation when a subfolder name is entered, discovered by chance, need not be changed.
User avatar
winnylinny
Posts: 146
Joined: Fri Apr 17, 2020 5:35 pm

Re: Batch convert -- Saving output to a relative folder

Post by winnylinny »

Perhaps something that looks like this? :D
subfolder-option.png

What do you think, Pierre?
You do not have the required permissions to view the files attached to this post.
User avatar
user0
XnThusiast
Posts: 1296
Joined: Sat May 09, 2015 9:37 am

Re: Batch convert -- Saving output to a relative folder

Post by user0 »

I really doubt there shall be more than one field for path

if go 'explicit' way, I think just adding 'Relative path' checkbox would be enough,
but tbh I would not bother and only add on_hover tooltip and describe it in wiki
User avatar
chrisncy
Posts: 115
Joined: Wed Jan 29, 2020 9:49 am
Location: Nancy, France

Re: Batch convert -- Saving output to a relative folder

Post by chrisncy »

Hello
Je trouve cela très interessant, mais je ne peux pas choisir cette option :-(

dossier_relatif.jpg


Edit par cday:

dossier_relatif_exemple.png

> "Dossier source\Vacances_2022"
You do not have the required permissions to view the files attached to this post.
cday
XnThusiast
Posts: 3888
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Batch convert -- Saving output to a relative folder

Post by cday »

chrisncy wrote: Thu Feb 09, 2023 7:56 am Hello
Je trouve cela très interessant, mais je ne peux pas choisir cette option :-(
It is only necessary to select the 'Source folder' (radio button) option, and to write the name of the desired source folder sub-folder into the 'Folder' name space: if the sub-folder does not already exist, it will be created automatically when processing starts.

An interesting chance discovery, but the interface does need to be modified slightly so that use is more intuitive.
User avatar
winnylinny
Posts: 146
Joined: Fri Apr 17, 2020 5:35 pm

Re: Batch convert -- Saving output to a relative folder

Post by winnylinny »

cday wrote: Thu Feb 09, 2023 8:13 am An interesting chance discovery, but the interface does need to be modified slightly so that use is more intuitive.
Exactly! Hence this useful feature request. :D


chrisncy wrote: Thu Feb 09, 2023 7:56 am Je trouve cela très interessant, mais je ne peux pas choisir cette option
TRANSLATION: J'ai créé la capture d'écran pour montrer comment cette fonctionnalité peut être implémentée. Cela améliorerait XnViewMP d'ajouter cette fonctionnalité.

ORIGINAL: I created the screenshot to demonstrate how this feature can be implemented. It would improve XnViewMP to add this feature. :mrgreen:
cday
XnThusiast
Posts: 3888
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Batch convert -- Saving output to a relative folder

Post by cday »

Thank you winnylinny, my details above from memory were not accurate, and that indicates a lack of intuitiveness in the present interface:

Screenshot from 2023-02-09 16-16-23.png

If the output files are to be placed in a subfolder in the source folder, the folder name would definitely be better placed in a new window to the right of the Source folder radio button, wouldn't it?
You do not have the required permissions to view the files attached to this post.