You should try something like this (untested):
sub macro()
With Application
Dim x%, sPath$
sPath = "c:\Data"
With .FileSearch
.LookIn = sPath
.FileName = "*.txt" 'modify for extension
If .Execute(SortBy:=msoSortByFileName, SortOrder:=msoSortOrderAscending) > 0 Then
For x = 1 To .FoundFiles.count
Workbooks.OpenText FileName:= _
.FoundFiles(x) 'record this part
range("1:"&[a65536].end(xlup).row).copy destination:=Workbooks("Master.xls").Sheets("Sheet1").[a65536].end(xlup).offset(1,0)
activeworkbook.close
next x
end sub