Als Antwort auf diesen Beitrag
teste mal:
Sub M_snb()
c00 = "D:\SNB_\"
sn = Split(CreateObject("wscript.shell").Exec("cmd /c dir " & c00 & "*.csv /a/b/o-d").StdOut.ReadAll, vbCrLf)
st = Array(FileLen(c00 & sn(0)), FileLen(c00 & sn(1)), FileLen(c00 & sn(2)))
For j = 0 To 2
If FileLen(c00 & sn(j)) = Application.Max(st) Then Name c00 & sn(0) As c00 & "L1.csv"
If FileLen(c00 & sn(j)) = Application.Large(st, 2) Then Name c00 & sn(0) As c00 & "L2.csv"
If FileLen(c00 & sn(j)) = Application.Min(st) Then Name c00 & sn(0) As c00 & "L3.csv"
Next
End Sub