Submitted By: Mothershed

Reports any files in a specified folder that are Older than 10 minutes.

Visual Basic
Edit|Remove
Const inputFile = "C:\DirectoryList.txt"
Const For_Reading = 1
Set oFso = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.OpenTextFile(inputFile, FOR_READING)
		sDir = oFile.ReadAll
		oFile.Close
		arDir = Split(sDir, vbCrLf)
	For Each sDir In arDir
	  If oFso.FolderExists( sDir) Then
  	Set oFol = oFso.GetFolder( sDir )
  		For Each f In oFol.Files
				Set oFile = f
		    		fiName = oFile.Name
		    		fiPath = oFol
		    		fiLMod = oFile.DateLastModified
						fiTimer = DateDiff("s", fiLMod, Now())
							If fiTimer > 600 Then
								wscript.echo oFile & " " & fiTimer
							End If
			Next
		Else
			wscript.echo sDir & " Does not exist"
		End If
	Next