Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the Network name of the Mapped Drive
Message
From
07/05/2003 04:57:27
Dorin Vasilescu
ALL Trans Romania
Arad, Romania
 
 
To
07/05/2003 04:36:49
Rene Lovino
Bigfoot Global Solutions, Inc
Cebu, Philippines
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00785692
Message ID:
00785695
Views:
13
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
Previous
Reply
Map
View

Click here to load this message in the networking platform