<% dim x(1000) 'The directory of all my pictures... Const mypath="/pictures" Set filesystem = CreateObject("Scripting.FileSystemObject") Set folder = filesystem.GetFolder(server.mappath(mypath)) Set filecollection = folder.Files 'Step through the files list, keeping track of 'the number of files.... idx=0 For Each file in filecollection idx=idx+1 x(idx)=file.name Next 'Choose a random picture randomize timer whichNo=int(rnd()*idx)+1 'Clean up... set filesystem=nothing set folder=nothing set filecollection=nothing 'Display the image! response.write "<img height=97% src=" & mypath & "/" response.write x(whichNO)& " alt=" & x(whichNo) & " border=5>" %>