Hi,
I am using .NET 1.1 along with 2K Professional Operating System.
How to create a new drive in a system which is not available in my
system.
Example: My System is having the A,B,C,D,E these drives..
I need to create another drive like F which is not available.
I have the code for this...
Any body give the smart Idea rather than this One..
This is my code..
string [] ArrPossibleDriv es=new
string[]{"A","B","C","D ","E","F","G"," H","I","J","K", "L","M","N","O" ,"P"
,"Q","R","S","T ","U","V","W"," X","Y","Z"};
string [] ArrSysDrives=ne w string[10];
string strArrayElement ;
string MapDrive="";
int a;
ArrSysDrives=Sy stem.IO.Directo ry.GetLogicalDr ives();
for(int i=0;i<ArrSysDri ves.Length;i++)
{
strArrayElement =ArrSysDrives[i];
strArrayElement =strArrayElemen t.Substring(0,s trArrayElement. IndexOf(":",
0));
ArrSysDrives[i]=strArrayElemen t.ToUpper();
}
for (int i=0; i<ArrSysDrives. Length; i++)
{
for (int j = 0; j < ArrPossibleDriv es.Length; j++)
{
a = ArrSysDrives[i].CompareTo(ArrP ossibleDrives[j]);
if(a==0) // If Exists=0 else returns -1
{
ArrPossibleDriv es[j]=null;
}
}
}
for(int i=0;i<ArrPossib leDrives.Length ;i++)
{
if(ArrPossibleD rives[i]!=null)
{
MapDrive=ArrPos sibleDrives[i];
break;
}
}
Thanks in advance for giving the great inputs
Thanks & regards
*** Sent via Developersdex http://www.developersdex.com ***