I use this to get a random quote, it may be some help.
<%
Set MyFileObj = Server.CreateObject("Scripting.FileSystemObject"
countsFile = Server.MapPath ("quote") & "\quotes.txt"
Set MyTextFile = MyFileObj.OpenTextFile(countsFile, 1, false )
IF NOT MyTextFile.AtEndOfStream THEN
header = CInt(MyTextFile.ReadLine)
END IF
RANDOMIZE
LowestNumber = 1
HighestNumber = header
RandomValue = INT((HighestNumber-LowestNumber+1)*Rnd+LowestNumber)
Count=0
WHILE NOT MyTextFile.AtEndOfStream AND NOT Count = RandomValue
quote = MyTextFile.ReadLine
Count = Count + 1
WEND
MyTextFile.Closee
response.write("Random quote " & RandomValue & " of " & HighestNumber & quote)
%>
the top of the file is the total number of quotes, then 1 quote per line
Edited by - brother beyond on 09 April 2002 14:28:36