"TC" <go*********@yahoo.comwrote in message
news:4f**********************************@i72g2000 hsd.googlegroups.com...
I'm trying to write some simple code using FSO, but I can't make it
work. There are a many FSO tutorials on the web, but they all start
with a line similar to:
set fs=Server.CreateObject("Scripting.FileSystemObject ")
Yet that line simply doesn't work. I've tried it on my server and on
my development PC, both of which are configured as web servers running
ASP. I suspect that these computers simply aren't configured to
support FSO, but nowhere can I find any hint of how to do that
configuration. Can anyone help?
Try this:
<% @Language="VBScript" %>
<% Option Explicit
Const cASP = "MapPath.asp"
Dim strSMP
strSMP = Server.MapPath(cASP)
Response.Write "<li>" & strSMP
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Response.Write "<li>" & objFSO.GetFile(strSMP).DateCreated
Set objFSO = Nothing
%>
Call it via (or something like):
http://localhost/MapPath.asp
Here's the output I got:
* C:\Inetpub\wwwroot\MapPath.asp
* 02/03/2008 10:44:19 PM
What do you get?