<html><head><title>Animator</title></head>
<body><script type="text/vbs">
set fso=CreateObject("Scripting.FileSystemObject")
set fldr=fso.GetFolder(".")
for each file in fldr.files
if lcase(right(file.name,4))=".gif" then
document.write "<img src=""" & file.name & """>"
end if
next
</script></body></html>
set fso=CreateObject("Scripting.FileSystemObject")
set fldr=fso.GetFolder(".")
WalkFolder fldr
Sub WalkFolder(CurrentFolder)
Dim SubFolder
For Each SubFolder In CurrentFolder.SubFolders
WalkFolder SubFolder
Next
Dim CurrentFile
For Each CurrentFile in CurrentFolder.Files
IF lcase(right(CurrentFile.name,4))=".gif" then
document.write "<img src=""" & CurrentFile.name & """>"
end if
Next
End Sub
Code:set fso=CreateObject("Scripting.FileSystemObject") set fldr=fso.GetFolder(".") WalkFolder fldr Sub WalkFolder(CurrentFolder) Dim SubFolder For Each SubFolder In CurrentFolder.SubFolders WalkFolder SubFolder Next Dim CurrentFile For Each CurrentFile in CurrentFolder.Files IF lcase(right(CurrentFile.name,4))=".gif" then document.write "<img src=""" & CurrentFile.name & """>" end if Next End Sub
This will recursively walk to the bottom of the directory structure and then process all the files. If you want it to only go a certain depth you could add a depth counter to the WalkFolder subroutine and stop walking at a programmed depth.
Did you make sure to replace your entire script?
Seems fine...I'd say look at the img src= and see if they are valid paths
I'd say look at the img src= and see if they are valid paths