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
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.