<%@ Language=VBScript %> <%Option Explicit %> <% Sub IterateThroughDirectory(objFolder) 'Process each file to determine if it is larger than 50kb 'or is of type MP3 'What is the maximum size of a file in bytes? Const MaxSize = 50000 '50 KB 'Now, use a for each...next to loop through the Files collection For Each objFile in objFolder.Files 'Check to see if objFile is an MP3 If LCase(Right(objFile.Name, 4)) = ".mp3" then 'Print out the violating file name and location Response.Write "<B>MP3 File!</B><BR>" Response.Write objFile.Path & "<P>" End if 'Make sure the file isn't too big If objFile.Size > MaxSize then 'Print out the violating file name and location Response.Write "<B>File is too large! (" & objFile.Size & " bytes)</B><BR>" Response.Write objFile.Path & "<P>" End If Next Dim objFile For Each objFile in objFolder.Files if Lcase(Right(objFile.Name,4)) = ".mp3" then objDict.Add CStr(iCount), objFile.Path iCount = iCount + 1 end if Next Dim objSubFolder For Each objSubFolder in objFolder.SubFolders IterateThroughDirectory objSubFolder Next End Sub Dim objFSO Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Dim strCurrentFolder strCurrentFolder = "C:\Inetpub\wwwroot\" Dim objFolder Set objFolder = objFSO.GetFolder(strCurrentFolder) IterateThroughDirectory objFolder %>