Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting the Network name of the Mapped Drive
Message
De
07/05/2003 04:57:27
Dorin Vasilescu
ALL Trans Romania
Arad, Roumanie
 
 
À
07/05/2003 04:36:49
Rene Lovino
Bigfoot Global Solutions, Inc
Cebu, Philippines
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00785692
Message ID:
00785695
Vues:
14
Try this procedure
PROCEDURE DriveInfo
LPARAMETERS tcDrive, tcRequiredInfo
*
* parameters :	tcDrive		drive ( "C:","D:", etc. , any type)
*		tcRequiredInfo	AvailableSpace, DriveLetter, DriveType, FileSystem, FreeSpace
*				IsReady, Path, RootFolder, SerialNumber, ShareName, TotalSize
*				VolumeName								
*		
LOCAL oFs as "Scripting.FilesystemObject" , oDrv as Object , lReturnValue as Variant , cInfo as String 

oFs = CREATEOBJECT("Scripting.FilesystemObject")
oDrv = oFs.GetDrive(tcDrive)
cInfo = "oDrv."+tcRequiredInfo
lReturnValue = EVALUATE(cInfo)
RELEASE oDrv,oFs

RETURN lReturnValue
>Hi All,
>
>Does anybody know on how to get the Network name of the mapped drive.
>I have use the following coding:
>
>objNetwork = createobject("WScript.Network")
>
>? objNetwork.EnumNetworkDrives(1) && This will return the network name of the mapped drive.
>
>My problem is, how I would supply the correct parameter on the EnumNetworkDrives() not to hard code the value? The value of the parameter will be dynamic such as 1, 2, and so... We cannot determine how many mapped drive available on each machine. Any idea or any different approach of solving it.
>
>
>Thank you in advance
>
>Rene
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform