private string FromShort(string spath)
{
string ret="";
if(spath.StartsWith("\\\\"))//network
{
string[] elm = spath.Split(new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar} );
if(elm.Length>2)
{
string lpath = "\\\\"+elm[2] + Path.DirectorySeparatorChar + elm[3];
for(int i = 4; i < elm.Length; i++ )
{
if(elm[i]!="")
{
string[] npath = Directory.GetFileSystemEntries(lpath, elm[i] );
lpath = npath[0];
}
}
ret=lpath;
}
}
else
{
string[] elm = spath.Split(new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar} );
string lpath = elm[0] + Path.DirectorySeparatorChar;
for(int i = 1; i < elm.Length; i++ )
{
if(elm[i]!="")
{
string[] npath = Directory.GetFileSystemEntries( lpath, elm[i] );
lpath = npath[0];
}
}
ret=lpath;
}
return ret;
}