|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
relative file path to absolute?Hi: I'm writing VB6 code and I need to be able to be given a relative
file path (e.g. "N:\UserDir\somefile.txt" and turn it into an absolute path (e.g. "\\DumServer\folder1\somefile.txt"). Easy way to do that? russ Translating a Mapped Drive to a UNC Path
http://vbnet.mvps.org/index.html?code/network/uncfrommappeddrive.htm Show quoteHide quote "Russ" <rwpatter***@tva.gov> wrote in message news:1128999883.152961.322350@g43g2000cwa.googlegroups.com... > Hi: I'm writing VB6 code and I need to be able to be given a relative > file path (e.g. "N:\UserDir\somefile.txt" and turn it into an absolute > path (e.g. "\\DumServer\folder1\somefile.txt"). > > Easy way to do that? > > russ > Russ wrote:
> Hi: I'm writing VB6 code and I need to be able to be given a relative See http://vb.mvps.org/samples/UncName> file path (e.g. "N:\UserDir\somefile.txt" and turn it into an absolute > path (e.g. "\\DumServer\folder1\somefile.txt"). > > Easy way to do that? The problem is, of course, that multiple mappings may be in place for a given drive. IOW, there may be no _one_ correct answer to this question. Karl
Surely that's only a problem going in the other direction, no matter how many mappings there are of different parts of a given disc, the root UNC path will be the same. BTW I though "relative path" referred to a path with respect to the selected one, not a mapped one. Best Regards Dave O. Show quoteHide quote "Karl E. Peterson" <k***@mvps.org> wrote in message news:uqueaRrzFHA.1252@TK2MSFTNGP09.phx.gbl... > Russ wrote: >> Hi: I'm writing VB6 code and I need to be able to be given a relative >> file path (e.g. "N:\UserDir\somefile.txt" and turn it into an absolute >> path (e.g. "\\DumServer\folder1\somefile.txt"). >> >> Easy way to do that? > > See http://vb.mvps.org/samples/UncName > > The problem is, of course, that multiple mappings may be in place for a > given drive. > IOW, there may be no _one_ correct answer to this question. > -- > Working Without a .NET? > http://classicvb.org/petition > > Yeah, I get those twisted about at times. You may be right. Thanks!
Dave wrote: Show quoteHide quote > Karl > > Surely that's only a problem going in the other direction, no matter > how many mappings there are of different parts of a given disc, the > root UNC path will be the same. > > BTW I though "relative path" referred to a path with respect to the > selected one, not a mapped one. > > Best Regards > Dave O. > > "Karl E. Peterson" <k***@mvps.org> wrote in message > news:uqueaRrzFHA.1252@TK2MSFTNGP09.phx.gbl... >> Russ wrote: >>> Hi: I'm writing VB6 code and I need to be able to be given a >>> relative file path (e.g. "N:\UserDir\somefile.txt" and turn it into >>> an absolute path (e.g. "\\DumServer\folder1\somefile.txt"). >>> >>> Easy way to do that? >> >> See http://vb.mvps.org/samples/UncName >> >> The problem is, of course, that multiple mappings may be in place >> for a given drive. >> IOW, there may be no _one_ correct answer to this question. >> -- >> Working Without a .NET? >> http://classicvb.org/petition
Avoid Overflow!
3 dimenional control array Converting decimal to BCD (binary coded decimal)... Transparent Picturebox I must be blind -- what's wrong with this sub? RESET does what? Why can't I test class functions from the Immediate window? Activex Exe convert month to month Getting information on a Word document |
|||||||||||||||||||||||