I have a directory '0'(say) and subfolders and files as shown below
0-
0.1
0.1.1
A.rdb
B.xml
0.1.2
A.rdb
B.xml
0.2
0.2.1
A.rdb
B.xml
0.1.2
A.rdb
B.xml
here is the code that i am using for it is below,
List<string> folders = new List<string>();
DirectoryInfo di = new DirectoryInfo(textBox1.Text);
IEnumerable<string> IEstring;
IEstring = from subdirectory in di.GetDirectories()
where subdirectory.GetFiles("*.*", SearchOption.AllDirectories).Length > 0
select subdirectory.Name;
folders = IEstring.ToList();
List<String> files = DirSearch(textBox1.Text);
textBox2.Text = textBox2.Text+ displayMembers(files);
The problem is i am unable to print this list named "files" I don't know where I am doing wrong here.
I also needed the result of folders and files to be printed in new excel spreadsheet. The result show be the same as this
0-
0.1
0.1.1
A.rdb
B.xml
0.1.2
A.rdb
B.xml
0.2
0.2.1
A.rdb
B.xml
0.1.2
A.rdb
B.xml
But in spreadsheet.