'Get all files from the directory
Sub GetAllFiles()
Dim sFolder As String
Dim wb As Workbook
Dim i As Long
With Application.FileSearch
.NewSearch
.LookIn = "D:/xiehl/ECSHOP/src/upload" 'to set directory
.SearchSubFolders = True
.Filename = "*.*" 'to set file 's type
.FileType = msoFileTypeExcelWorkbooks
If .Execute() > 0 Then
For i = 1 To .FoundFiles.Count
On Error Resume Next
Cells(i, 1) = .FoundFiles(i)
Next i
Else
MsgBox "Folder " & sFolder & " contains no required files"
End If
End With
End Sub