I was wondering if XnView is able to use relative paths in the database.
Like when I have XnView portable on the NAS and access it via SMB network share, will it write a portable path from the exe, or the drive letter of the network share or the IP address?
I think about situations where the drive letter will get changed and if the database will not be able to find the files anymore.
Does anyone have experience with that?
XnView on NAS
Moderator: xnview
-
xnview
- Author of XnView
- Posts: 47584
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: XnView on NAS
Yes, in Settings>Catalog, it's 'base path'robubble wrote: Fri Apr 03, 2026 12:35 pm I was wondering if XnView is able to use relative paths in the database.
Pierre.
-
robubble
- Posts: 19
- Joined: Thu Oct 10, 2024 4:43 pm
Re: XnView on NAS
I'm not sure if I understand this correctly.
As an example I have this structure:
D drive
-XnView folder
--xnview.exe
-data folder
--image folder
---sub 1
----images.jpg
---sub 2
----images.png
And then I set the base path to be: D:\data folder\image folder\
Is the relative path dependent of the exact levels or just the base folder?
So when I change the structure to:
F drive
-XnView folder
--xnview.exe
-image folder
--sub 1
---images.jpg
--sub 2
---images.png
Would the database with the base folder still work when the new base path is: F:\image folder\ ?
Because the base folder and the underlying structure would relatively (base to images still be the same.
Or is it taking the location of the xnview.exe as a reference and expects in that case one level up and two levels down?
-
jkm
- Posts: 441
- Joined: Sat May 11, 2024 12:43 am
Re: XnView on NAS
Robubble, are you actually trying to run XnViewMP on multiple computers? If not, don't mess with the base path setting.
-
robubble
- Posts: 19
- Joined: Thu Oct 10, 2024 4:43 pm
Re: XnView on NAS
Yes, as I described, that's what could eventually happen when I have to map the network paths. The drive letter can change during that, so you could say that I want to run it on multiple devices and thus I want to make sure XnView is able to pick up the files relatively (structure will not change but the drive letter or the first folder).jkm wrote: Fri Apr 10, 2026 5:28 am Robubble, are you actually trying to run XnViewMP on multiple computers? If not, don't mess with the base path setting.
Why are you that concerned about the base path? Didn't it work for you?
For me, there are two ways how or where I could run XnView:
1. Portable from the NAS itself
- Still, the drive letter can change when I mount the network path on other devices.
+ Advantage would be, I only have to take care about one XnView instance.
2. XnView installed on every device
- Means more maintenance regarding updates and probably also the danger of database corruption when I'm not connected to the NAS.
+ I can use it on every device, even when not connected to the NAS.
-
jkm
- Posts: 441
- Joined: Sat May 11, 2024 12:43 am
Re: XnView on NAS
Sorry, I read your posts carefully, but nowhere did I see any statement or intimation about multiple computers.
And since you say "could eventually happen" I take it that currently the answer is no.
Since you're confused about base path, I'm trying to help you, but of course you're free to disregard what I say and do as you like.
It's not that I'm "concerned" about base path. But the fact is that a lot of people think they ought to change this setting, when in fact they should not.
It's generally prudent to use simpler solutions rather than more complex ones when possible. And in the scenarios you describe, it is not necessary to use base path. You have simpler means available to you.
As I'm sure you understand, the relevant part of XnViewMP is the database, and specifically the contained paths to the image files. As long as that path is the same on all PCs, base path is simply not necessary, and using it conveys no advantage.
Why? That would simply be short-sighted systems administration. You have a DB (XnViewMP) and you know paths are important. You have 23 available drive letters give or take, so simply pick one and stick with it.robubble wrote: Fri Apr 10, 2026 5:44 am - Still, the drive letter can change when I mount the network path on other devices.
So for example, wherever your photo directory might be on your NAS, if you map root to that, so that P:\ is your photos directory on every PC, then you also do not need to mess with base path. For example:
Code: Select all
net use P: \\nas\volume1\dir1\subdir3\photos /PERSISTENT:YESIf you relocate your files on your NAS, change directory names, whatever, simply change the mapping on your computers, and P:\ will still point to the new correct path.
There is no need for the P drive letter (or whatever you pick) to "change". In a home environment, I don't think you're going to run out of drive letters.
Keep that drive letter the same on all PCs, and you have no need at all for base path. That's my advice.
I wish you the best of luck on your endeavors...
-
robubble
- Posts: 19
- Joined: Thu Oct 10, 2024 4:43 pm
Re: XnView on NAS
No, I am sorry. I wasn't clear enough about my setup.jkm wrote: Fri Apr 10, 2026 7:03 am Sorry, I read your posts carefully, but nowhere did I see any statement or intimation about multiple computers.
And since you say "could eventually happen" I take it that currently the answer is no.
Yes, multiple devices are connected to that NAS. Some always, others not all the time.
As for the drive letter, yes I could pay attention to having always the same but that's exactly why I was asking, how much flexibility this base path/relative approach will give me in terms of "relinking".
The question is also rooted in the way I set up the structure of my NAS. Not every folder is mounted all the time, some of them where there isn't really a reason to mount them, I access directly through the IP (\\IP-address\Images) or the NAS device name (\\NAS name\Images).
Earlier that year, there was a problem with a Windows update after which I wasn't able to use the NAS name anymore and could only use it with the IP.
This are the cases that make me wonder, how much can the database be abused and how flexible base paths are. Does it even care about drive letters or does the base path and the structure from there only have to stay the same and will the database break or find the files again when I move stuff around?
I know paths are important, hence the question about relative paths.
Some more insight: I don't only want to use it with images but also other media (more or less like TagSpaces). I know, XnView isn't meant to be used for DAM but for tagging it works quite well because of its flexibility (I also can tag folders for example and I can backup the information in sidecars) and is better than having different tools and databases for every kind of media.
Advantage of the base path could be, that I don't have to mount a drive at all and could basically use the database with every device that I connect to my NAS, even if it's just temporarily.
It's no problem to test all of that, I just wanted to see first if some people have had a similar use-case and what the possibilities and limitations are.
Thanks for your advice
-
xnview
- Author of XnView
- Posts: 47584
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: XnView on NAS
yesrobubble wrote: Thu Apr 09, 2026 5:48 pm Would the database with the base folder still work when the new base path is: F:\image folder\ ?
Pierre.