Hej Carsten,
Jeg har lige lavet et hurtigt eksempel til dig her:
-----------START -----------------
<!DOCTYPE html PUBLIC "-//W3C//DTD html 4.0 Transitional//EN">
<html>
<head>
<title>Billeder</title>
</head>
<body>
<%
Randomize
strFolderPath = Server.MapPath("/")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(strFolderPath)
Set objFolderSubFolders = objFolder.SubFolders
gblCount = 0
For Each objFolderItem in objFolderSubFolders
dirTemp = dirTemp & "," & objFolderItem.Name
gblCount = gblCount + 1
Next
dirTemp = Mid(dirTemp, 2, len(dirTemp))
arrDir = Split(dirTemp, ",", -1, 1)
Response.Write(dirTemp & " -> " & gblCount & "<br><br>")
Response.Write(Int(Rnd * gblCount) + 1 & "<br><br>")
Response.Write(arrDir(Int(Rnd * gblCount) + 1) & "<br><br>")
%>
</table>
</body>
</html>
-----------SLUT -----------------
Du kan evt. lave en sortering så det kun er jpg & gif filer der er i
søgestrengen ... Lige nu tager den ALLE filer inkl. biblioteker.
God fornøjelse!
/ Jan