Shell command hang(Answered)

I am using the bellow code for a simple folder count in shell.
The problem is ,when i use the command in folder with 2 subfolders working ok.
But if the folder have more than 2 folders the app hangup…
i have test it in osx terminal with more than 300 subfolders and working fine…
Anyone have a similar problem ?

[code] Dim TagRow As String
For i As Integer = 0 To listbox1.listcount-1
TagRow = Listbox1.RowTag(i)

Dim sc As String
sc =“cd " + TagRow +” ; "+ “ls -lR | grep ^d | wc -l”

Dim s As New Shell


If s.ErrorCode = 0 Then
fCount.Text = s.Result
MsgBox "Error " + Str(s.ErrorCode)
End If[/code]

Maybe shell.timeout must be set? ( Assume same on Mac as PC )

I found the problem.
The problem was the path i have include in the Rowtag…
By mistake i put nativePath and no shellPath