R
Rinaldo
Hi,
I have a problem to get the directory.
I've tryed:
public void WriteWeb(DirectoryInfo directory)
{
DirectoryInfo[] subDirectories = directory.GetDirectories();
string Map = currentMap; // Global string to local string
string Web = currentWeb; // Global string to local string
if (subDirectories != null)
{
foreach (DirectoryInfo subDir in subDirectories)
{
Console.WriteLine(subDir.Name);
string Dir = subDir.Name;
Map += "\\" + subDir.Name;
Web += subDir.Name + "/";
// MessageBox.Show("Dir " + Web + "\n" + Map);
WriteWeb(subDir);
}
}
}
The problem is that if I have C:\pad\backup and there are 2 dirs in it (One
and Two) the complete dir will become C:\pad\backup\One\Two\ and not 2
seperate dirs in both Map and Web.
What I doing wrong,
I have a problem to get the directory.
I've tryed:
public void WriteWeb(DirectoryInfo directory)
{
DirectoryInfo[] subDirectories = directory.GetDirectories();
string Map = currentMap; // Global string to local string
string Web = currentWeb; // Global string to local string
if (subDirectories != null)
{
foreach (DirectoryInfo subDir in subDirectories)
{
Console.WriteLine(subDir.Name);
string Dir = subDir.Name;
Map += "\\" + subDir.Name;
Web += subDir.Name + "/";
// MessageBox.Show("Dir " + Web + "\n" + Map);
WriteWeb(subDir);
}
}
}
The problem is that if I have C:\pad\backup and there are 2 dirs in it (One
and Two) the complete dir will become C:\pad\backup\One\Two\ and not 2
seperate dirs in both Map and Web.
What I doing wrong,