A relative path has to be relative to something.
The OS maintains a "current directory" (plain-speak term, not a technical term) for each drive. It also maintains a "Current Drive."
If the current drive is C, and the current directory of C is SomeFldr, the a reference to
.open "SomeSubFldr\A_Text_Fil.txt"
will open
C:\SomeFldr\SomeSubFldr\A_Text_Fil.txt
VB 6 has a ChDrive method that changes what the current drive is. Having changed drives this way, CurDir can be used to find out what the current folder is, or to change it.
In DOS we used DIR [
Enter] to see what the current drive and directory was, as well as to see all the files in that directory.
C:[
Enter] was used to make the C drive the current drive. (So this arrangement dates way back into the earliest of DOSâs.)
Iâm absolutely certain that .NET has similar functionality, since it reflects back to the underlying File System functionality.
So it looks as if you are going to have to gain some specific knowledge of the specific machineâs configuration to be able to use relative paths (so that you can set the current drive, you see). I think that if you can gain that information, then there is no benefit to using relative paths at all. You would just concatenate the gleaned information with the predetermined path information, and use an absolute path.