Oder
Code:
Sub M_snb()
sn=createobject("wsript.shell").exec("cmd /c Dir ""G:\OF\*.*"" /a-d/b/s").stdout.readall
st=filter(sn,".pdf")
if ubound(st)>-1 then sheet1.cells(1,1).resize(ubound(st)+1)=application.transpose(st)
st=filter(sn,".doc*")
if ubound(st)>-1 then sheet1.cells(1,2).resize(ubound(st)+1)=application.transpose(st)
st=filter(sn,".xls*")
if ubound(st)>-1 then sheet1.cells(1,3).resize(ubound(st)+1)=application.transpose(st)
End Sub