Dim fso, myFolder, myFile, curFolder
Set fso = wscript.CreateObject(”scripting.filesystemobject”)
Set curFolders = fso.getfolder(thePath)
DirTotal = DirTotal + 1
If curFolders.Files.Count > 0 Then
For Each myFile In curFolders.Files
If InStr(1, LCase(Fso.GetExtensionName(myFile.Name)), ext) > 0 And Gtime(myFile.DateCreated) >Time1 And Gtime(myFile.DateCreated)<Time2 Then
wscript.echo FormatPath(thePath) & “\” & myFile.Name
FileTotal = FileTotal + 1
FileTotalsize = FileTotalsize + myFile.size
End If
Next
End If
If curFolders.subfolders.Count > 0 Then
For Each myFolder In curFolders.subfolders
myFind FormatPath(thePath) & “\” & myFolder.Name
Next
End If
End Sub
Function FormatPath(ByVal thePath)
thePath = Trim(thePath)
FormatPath = thePath
If Right(thePath, 1) = “\” Then FormatPath = Mid(thePath, 1, Len(thePath) - 1)
End Function
Function Gtime(str)
str=FormatDateTime(str,2)
str1=Split(str,”-”,-1,1)
If len(str1(1))=1 then str11=”0″&str1(1)
If len(str1(2))=1 then str12=”0″&str1(2)
Gtime=str1(0)&str11&str12
End Function