Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Server Name
Message
 
 
À
26/07/2007 11:56:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01243772
Message ID:
01243806
Vues:
28
>>>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 #1232759
>
>I 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
>
It is actually in the Docs, see
You can include V in cAttribute to return the volume name of the current drive. Only the volume name is returned to the array if V is included with D, H, or S. The volume name is stored in the first array element and the remainder of the array is truncated.


But this is probably the simplest method, you're right.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform