I have the following four folders in the "images" folder:
"03-01 to 05-31 spring"
"06-01 to 08-31 summer"
"09-01 to 11-30 fall"
"12-01 to 02-29 winter"
Contents of default.asp :
<!-- The includefile is one level back from the "default.asp" file: -->
<!--#include file ="../../jakes_IO.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="da">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Example use of the FindFolderByDate function</title>
<link rel="stylesheet" type="text/css" href="/jake.css">
</head>
<body>
<div align="center"><h1>Using FindFolderByDate()</h1></div>
<span class="data">
This page will show different images depending on the time of year you are visiting my site.
<br>There will also be a quote that fits the season : )
<p>I have the following four folders in the "images" folder:
<p><img src="images/folder.gif"> "03-01 to 05-31 spring"
<br><img src="images/folder.gif"> "06-01 to 08-31 summer"
<br><img src="images/folder.gif"> "09-01 to 11-30 fall"
<br><img src="images/folder.gif"> "12-01 to 02-29 winter"
</span>
<!-- *************** HERE IS WHERE IT HAPPENS!! ****************** -->
<p><%
dim imagename, quote, folder
folder = FindFolderByDate("images")
imagename = GetRandomImageFromFolder(folder)
quote = GetRandomLineFromFile(folder & "/quotes.txt")
%>
<!-- ********************************************************************** -->
<div style="border:1px solid black;padding:10px;">
<b><%=imagename%></b>
<br><img style="border:1px solid black;" src="<%=imagename%>">
<br><span style="font-size:10px;"><%=quote%></span>
<p><button onclick="window.location.reload();">Reload page</button>
</div>
<p><b>Contents of default.asp :</b><br>
<span class="source">
<% response.write(stringToHTML (GetFileContents("default.asp")))%>
</span>
</body>
</html>