Hi there
I have one mapped network drive to my PC at home. i call it the V Drive
i came across a Jscript which had the following line when
EnumNetworkDrives Method was initiated
var x = objNetwork.EnumNetworkDrives();
for(i = 1; i < x.length; i += 2)
{
if(strRoot.toUpperCase()==x.Item(i).toUpperCase())
{
return true;
}
}
please note strRoot = is a folder location on my PC
can u explain how this code works and what is passed to strRoot finally. i know each drive occupies 2 items in the collection of objNetwork. Each mapped Drive takes up 2 items in the collection, one for drive letter and one for UNC Path i.e. \\server1\share1.
I have one mapped network drive to my PC at home. i call it the V Drive
i came across a Jscript which had the following line when
EnumNetworkDrives Method was initiated
var x = objNetwork.EnumNetworkDrives();
for(i = 1; i < x.length; i += 2)
{
if(strRoot.toUpperCase()==x.Item(i).toUpperCase())
{
return true;
}
}
please note strRoot = is a folder location on my PC
can u explain how this code works and what is passed to strRoot finally. i know each drive occupies 2 items in the collection of objNetwork. Each mapped Drive takes up 2 items in the collection, one for drive letter and one for UNC Path i.e. \\server1\share1.