Hello all,
Could somone help me with this search script please, it fails on the fuction, but haven't a clue why any help would be appriciated
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Option Explicit
Dim ObjFSO
Dim ObjStartDrive
Dim ObjFolder
Dim Folder
Dim ObjFile
Set ObjFSO = CreateObject("Scripting.FileSystemObject")
Set ObjStartDrive = ObjFSO.GetFolder("c:\")
For Each ObjFolder In ObjStartDrive.SubFolders
FindFiles(Folder)
Function FindFiles(Folder)
Set Folder = ObjFSO.GetFolder(Folder)
For Each ObjFile In Folder.Files
If InStr(1, ObjFile.Name, ".zip", 1) Then
WScript.Echo ObjFile.Path
Wscript.Echo ObjFile.DateCreated
Else
End If
Next
If Folder.SubFolders.Count > 0 Then
For Each Folder In Folder.SubFolders
FindFiles(Folder.Path)
Next
End If
End Function
Could somone help me with this search script please, it fails on the fuction, but haven't a clue why any help would be appriciated
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Option Explicit
Dim ObjFSO
Dim ObjStartDrive
Dim ObjFolder
Dim Folder
Dim ObjFile
Set ObjFSO = CreateObject("Scripting.FileSystemObject")
Set ObjStartDrive = ObjFSO.GetFolder("c:\")
For Each ObjFolder In ObjStartDrive.SubFolders
FindFiles(Folder)
Function FindFiles(Folder)
Set Folder = ObjFSO.GetFolder(Folder)
For Each ObjFile In Folder.Files
If InStr(1, ObjFile.Name, ".zip", 1) Then
WScript.Echo ObjFile.Path
Wscript.Echo ObjFile.DateCreated
Else
End If
Next
If Folder.SubFolders.Count > 0 Then
For Each Folder In Folder.SubFolders
FindFiles(Folder.Path)
Next
End If
End Function