Estoy listando unos ficheros de una carpeta y me gustaria que se ordenaran segun la fecha de modificacion.
Código:
Option Explicit WScript.Echo ShowFolderList("C:\Documents and Settings\") Function ShowFolderList(folderspec) Dim fso, f, f1, fc, s Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(folderspec) Set fc = f.SubFolders For Each f1 In fc s = s & f1.name & " (" & f1.DateLastModified & ")" s = s & VbCrLf Next ShowFolderList = s End Function