Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mapping network drives
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00427412
Message ID:
00427444
Views:
13
>>Larry,
>>Thanks for the quick response. As a matter of fact, I found some sample code in the MSDN Library that referred to the FileSystemObject and such, but it reached a point where that code failed, and I couldn't figure out why. It looks like the following:
>>
>>local fs, d, s
>>fs = CreateObject("Scripting.FileSystemObject")
>>d = fs.GetDrive(fs.GetDriveName(fs.GetAbsolutePathName('l:')))
>>s = "Drive " + d.DriveLetter + ": - " + d.VolumeName
>>
>>In debugger mode, the fs object cascades to show me 3 methods that come along with the object; GetDrive, GetDriveName, and GetAbsolutePathName. However, when line 3 above is executed, 'd' is shown as an object, but I am unable to see any members of any kind inside it. Therefore, when line 4 executes, it fails, telling me that 'Variable DriveLetter does not exist'. I assume from the context that 'd' is a Drive Object, but I can't seem to figure out what to do with it now that I've got it. I'll continue to look into those WSH links you referred to though unless someone can come back with more insight here. Thanks again, and please forgive the hard coded 'l:' in the example. It was for example purposes only. :^)
>
>Paul,
>
>This is really weird, but try a longer variable name. I don't believe this myself, but...
* Same results as you
>fs = CREATEOBJECT('Scripting.FileSystemObject')
>d = fs.GetDrive("i:") && Network drive
>? d.DriveLetter, d.VolumeName && Bombs...but
>oDrive = fs.GetDrive("i:") && Network drive
>? oDrive.DriveLetter, <b>oDrive</b>.VolumeName && Works fine
Don't ask me why.:-)

Sheesh! see correction above
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform