>>I have a win98 network
>>
>>I can I return the server name only by the letter
>>eg.
>> suppose i dont know the servers name.
>>
>>
>> c:\ returns \\computer1
>> d:\ returns \\computer2
>> e:\ returns \\computer3
>>
>> etc.
>>
>>I need to store that to a variable
>>
>
>If you have the Windows Scripting Host installed (which if everyone is running Win98, you do, you can get the information from the Wscript.Network object, which can return a collection of mapped drives and the UNC that they're mapped to via the EnumNetworkDrives method.
Before anyone asks, this is how you use EnumNetworkDrives:
oWshNet = CREATEOBJ('Wscript.Network')
oDriveCollection = oWshNet.EnumNetworkDrives
FOR nI = 0 TO oDriveCollection.Count - 2 STEP 2
? oDriveCollection.Item[nI] + ' is ' + oDriveCollection.Item[nI+1]
ENDFOR