Page 1 of 2
Batch convert -- Saving output to a relative folder
Posted: Mon Jan 23, 2023 3:03 pm
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! 
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. 
- - -
EDIT: Here is what it could look like, based on the conversation between myself, cday, and user0.
Checkbox selected
Checkbox deselected
XnViewMP
already supports this, but you have to "trick" the "Folder" selection.
This is a better method, and it is more clear for the user.
Re: Batch convert -- Saving output to a relative folder
Posted: Mon Jan 23, 2023 3:44 pm
by cday
An interesting discovery, possibly not an intended option...?
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...

Re: Batch convert -- Saving output to a relative folder
Posted: Mon Jan 23, 2023 3:57 pm
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!
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 )
Re: Batch convert -- Saving output to a relative folder
Posted: Mon Jan 23, 2023 5:17 pm
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!
Maybe Pierre does too?
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?
Re: Batch convert -- Saving output to a relative folder
Posted: Mon Jan 23, 2023 6:50 pm
by winnylinny
cday wrote: Mon Jan 23, 2023 5:17 pm
Maybe Pierre does too?
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:
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
Re: Batch convert -- Saving output to a relative folder
Posted: Mon Jan 23, 2023 7:55 pm
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.

Re: Batch convert -- Saving output to a relative folder
Posted: Mon Jan 23, 2023 9:01 pm
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.
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.
I've correct them!)
Re: Batch convert -- Saving output to a relative folder
Posted: Fri Feb 03, 2023 12:13 am
by winnylinny
I can confirm this works the same in Windows too.
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".
Re: Batch convert -- Saving output to a relative folder
Posted: Fri Feb 03, 2023 6:54 pm
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...
The existing
Source folder operation when a subfolder name is entered, discovered by chance, need not be changed.
Re: Batch convert -- Saving output to a relative folder
Posted: Sat Feb 04, 2023 12:01 am
by winnylinny
Perhaps something that looks like this?
What do you think, Pierre?
Re: Batch convert -- Saving output to a relative folder
Posted: Sat Feb 04, 2023 5:01 am
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
Re: Batch convert -- Saving output to a relative folder
Posted: Thu Feb 09, 2023 7:56 am
by chrisncy
Hello
Je trouve cela très interessant, mais je ne peux pas choisir cette option
Edit par
cday:
> "Dossier source\Vacances_2022"
Re: Batch convert -- Saving output to a relative folder
Posted: Thu Feb 09, 2023 8:13 am
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.
Re: Batch convert -- Saving output to a relative folder
Posted: Thu Feb 09, 2023 2:47 pm
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.
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.

Re: Batch convert -- Saving output to a relative folder
Posted: Thu Feb 09, 2023 4:25 pm
by cday
Thank you
winnylinny, my details above from memory were not accurate, and that indicates a lack of intuitiveness in the present interface:
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?