Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to find UNC path to a file?
Message
De
09/07/2007 13:24:03
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01232750
Message ID:
01238669
Vues:
12
>>>>>One of the solutions could be like this:
>>>>>oFSO = CREATEOBJECT("Scripting.FileSystemObject")
>>>>>
>>>>>lo= oFSO.GetFile(getfile())
>>>>>?lo.Drive.ShareName
>>>>
>>>>Yuri, first thank you for your help.
>>>>
>>>>Can you think why when I run your simple code (above), I get empty value of .ShareName? Could it be because I choose a file from my local drive?
>>>
>>>I do not get it: if you choose the file from the local drive, then what UNC you expect?
>>
>>You can always convert c:\sub\dire\cto\ry into \\127.0.0.1\c$\sub\dire\cto\ry (if the local IP is known, it can be used instead), but that's cheating, and I don't see any purpose to it.
>
>Very interesting. So, if we access a table using local IP and found it slow, we may get its actual path instead using a reverse code of Yuri's?

The difference would be, I assume, minimal. You'd get some speed by circumventing the network layer, but that's just some code which still runs only locally.

I think the above way of accessing your local tables via an UNC is actually a good way to test how your app works with UNCs without having to really employ two machines for that. But that's pretty much all the use it can have... unless you count the face anyone who sees what you're doing would make :)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform