Thomas: Files im Directory

Beitrag lesen

Hallo,
z. B. so:

<html>
<head>
<title>images</title>

<SCRIPT LANGUAGE="VBScript">
  Sub ShowImages (Path)
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.GetFolder(Path)
    Set fc = f.Files
    For Each f1 in fc
      If (InStr(f1.type,"JPEG")) Then
        Document.Write "<a href=" & f1.path & "><img src=" & f1.path & "></a>"
      End If
    Next
  End Sub
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
  Document.Write "<h3>" & window.location.href & "</h3>"
  ShowImages("e:\images")
</SCRIPT>

</head>
<body>

</body>
</html>

CU
Thomas