% picsperpage=42 picsperpage=picsperpage-1 Dim DirectoryList(350) Colcount=0 TotalPicsCount=0 StartOn = Request.querystring("StartOn") if StartOn="" then StartOn=1 end if EndOn=StartOn+picsperpage 'DirectoryList="" APPL_PHYSICAL_PATH = Request.ServerVariables("APPL_PHYSICAL_PATH") If Request("Dir") = "" Then Directory = APPL_PHYSICAL_PATH & "miscpics\thumbs\" Else Directory = Request("Dir") End If Set Upload = Server.CreateObject("Persits.Upload.1") Set Dir = Upload.Directory( Directory & "*.*", SORTBY_NAME) %> <% For Each Item in Dir %> <% If Item.IsSubdirectory Then else Colcount=Colcount+1 TotalPicsCount=TotalPicsCount+1 DirectoryList(totalpicscount)=Server.URLEncode( Item.FileName )%> <% End If Next%>