>>This still returns the mapped drive.
>
>Forgot a simpler code, which was discussed recently
>
Re: How to find UNC path to a file? Thread #
1232750 Message #
1232759I didn't know about the "V" flag on ADIR(). It's in Hacker's Guide, but not in VFP docs.
Posted by Frank in that thread:
Function GetFileUNC
Lparameter pcDirText
IF FILE(pcDirText) AND ADIR(laDir,JUSTPATH(pcDirText),"V") >= 1 ;
AND LEFT(laDir(1),2) = "\\"
pcDirText = STUFF(pcDirText, 1, 2, laDir(1))
ENDIF
RETURN pcDirText
endproc
Steve Gibson