NewbiDoobie
Technical User
I have a site uploaded to a server. Within this site I have a folder which contains between 5 to 10 separate web pages which are loaded into an inline frame at random.
What I am trying to do is:
A: get the count of the number of files in the web folder
B: generate a random number based on the count of files
C: display that file into the iframe on my page
Since I am not sure of the full directory of the server it is on, is it possible to get this in relation to the web pages I am loading?
I am trying something like this, but I keep getting errors:
Dim oFSO
Dim oFolder
Dim FileCount
Set oFSO = server.CreateObject("Scripting.FileSystemObject")'
set oFolder = oFSO.GetFolder("Application("WebRoot")" & "/rotation"
Randomize
filecount = cint(oFolder.Files.Count) * Rnd ) + 1'
What I am trying to do is:
A: get the count of the number of files in the web folder
B: generate a random number based on the count of files
C: display that file into the iframe on my page
Since I am not sure of the full directory of the server it is on, is it possible to get this in relation to the web pages I am loading?
I am trying something like this, but I keep getting errors:
Dim oFSO
Dim oFolder
Dim FileCount
Set oFSO = server.CreateObject("Scripting.FileSystemObject")'
set oFolder = oFSO.GetFolder("Application("WebRoot")" & "/rotation"
Randomize
filecount = cint(oFolder.Files.Count) * Rnd ) + 1'