You're welcome
Try this version
Public r As Long
Sub Test()
Dim strPath As String
Dim sh, n, x, i
'Change Path To Suit
strPath = ThisWorkbook.Path & "\"
Set sh = CreateObject("Shell.Application")
x = GetFiles(strPath, "*.zip", True)
r = 7
For Each i In x
Set n = sh.Namespace(i)
Recur sh, n
Next i
End Sub
Sub Recur(sh, n)
Dim i, subn, x As Long, p As Long, y As Long
For Each i In n.items
If i.isfolder Then
Set subn = sh.Namespace(i)
Recur sh, subn
Else
p = LastPos(i.Path, "\")
Cells(r, 1) = Mid(i.Path, p + 1)
y = LastPos(Replace(i.Path, "\" & Cells(r, 1), ""), "\")
Cells(r, 2) = Mid(Replace(i.Path, "\" & Cells(r, 1), ""), y + 1)
r = r + 1
End If
Next i
End Sub
Function GetFiles(StartPath As String, FileType As String, SubFolders As Boolean) As Variant
StartPath = StartPath & IIf(Right(StartPath, 1) = "\", vbNullString, "\")
GetFiles = Split(Join(Filter(Split(CreateObject("WScript.Shell").Exec("CMD /C DIR """ & StartPath & FileType & """ " & IIf(SubFolders, "/S", vbNullString) & " /B /A:-D").StdOut.ReadAll, vbCrLf), ":"), "#"), "#")
End Function
Function LastPos(strVal As String, strChar As String) As Long
LastPos = InStrRev(strVal, strChar)
End Function