Hello, string childrenpath = childpath+"\ \"+childlist [childcount]. getname(); Is this sentence in the for loop above?
If not, put the code int childcount=0 before for ().
The reason for this problem is the string childpath = childpath+"\ \"+childlist [childcount]. getname(); I don't know childcount because it is only a local variable in the for loop.