Hi folks,

Below I have some code that happily works by looking up the id3 tags of found .mp4 files and return back the results of each property. Does anyone know how I can get it search through subfolders please:

<% 'Get all .mp4 video types
Dim objShell, objFSO, objFolderName, objItem
Dim strPath, i
Dim sInfo

sInfo = "Item Description"
strPath = "D:\Movies"

Set objShell = CreateObject("Shell.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject")

If Not objFSO.FolderExists(strPath) Then
Response.Write("Folder " & strPath & " is inaccessble")

Set objFolderName = objShell.NameSpace(strPath)
Set objItem = objFolderName.Items()

If (Not objItem Is Nothing) Then
If objItem.Count = 0 Then
Response.Write("no files found in this folder: " & strPath )
End If

For Each oItem In objItem
If oItem.Type = "MPEG4 Media (.mp4)" Or oItem.Type = "MPEG4 Media (mp4)" _
Or oItem.Type = "MPEG4 Media" Or oItem.Type = "MP4 Format Video" Then

For i = 0 to 286
sInfo = sInfo & "<br>" & i & ": " & objFolderName.GetDetailsOf(oItem, i) & "<br>"

End If
End If
End If

I have my movies saved within subfolders in the root of D:\Movies and I need the above script to search through Subfolders also.

I have not used objShell.NameSpace before and not familiar with this tbh.

Please help!!!

Thank you