ajtsystems
IS-IT--Management
Hi:
objStartFolder = "d:\"
LogFile = "file list.txt"
Dim objLogFile:Set objLogFile = objFSO.CreateTextFile(logfile, 2, True)
Set objFolder = objFSO.GetFolder(objStartFolder)
Set colFiles = objFolder.Files
For Each objFile in colFiles
objLogFile.Write objFolder.Path & "\" & objFile.Name
objLogFile.Writeline
Next
ShowSubfolders objFSO.GetFolder(objStartFolder)
Sub ShowSubFolders(Folder)
config ="config"
For Each Subfolder in Folder.SubFolders
Set objFolder = objFSO.GetFolder(Subfolder.Path)
Set colFiles = objFolder.Files
For Each objFile in colFiles
'objLogFile.Write Subfolder.name & "\" & objFile.Name
'objLogFile.Writeline
arrmemfiles = array(objfile.name)
for i = 0 to ubound(arrmemfiles)
b = filter(arrmemfiles, "web.config")
for each x in b
'this should echo when it finds web.config
wscript.echo x
next
next
next
ShowSubFolders Subfolder
next
End Sub
objLogFile.Close
I have the words web.config in the folder but it doesnt seem to seee it? Is it that the array is not strings?
objStartFolder = "d:\"
LogFile = "file list.txt"
Dim objLogFile:Set objLogFile = objFSO.CreateTextFile(logfile, 2, True)
Set objFolder = objFSO.GetFolder(objStartFolder)
Set colFiles = objFolder.Files
For Each objFile in colFiles
objLogFile.Write objFolder.Path & "\" & objFile.Name
objLogFile.Writeline
Next
ShowSubfolders objFSO.GetFolder(objStartFolder)
Sub ShowSubFolders(Folder)
config ="config"
For Each Subfolder in Folder.SubFolders
Set objFolder = objFSO.GetFolder(Subfolder.Path)
Set colFiles = objFolder.Files
For Each objFile in colFiles
'objLogFile.Write Subfolder.name & "\" & objFile.Name
'objLogFile.Writeline
arrmemfiles = array(objfile.name)
for i = 0 to ubound(arrmemfiles)
b = filter(arrmemfiles, "web.config")
for each x in b
'this should echo when it finds web.config
wscript.echo x
next
next
next
ShowSubFolders Subfolder
next
End Sub
objLogFile.Close
I have the words web.config in the folder but it doesnt seem to seee it? Is it that the array is not strings?