Get server side file information?

D

Dennis

I copy my Access DB to FP's fpdb directory and then upload it, along with
the rest of my web site, to my ISP's server.

I'd like to have my ASP pages, which execute on the server, determine the
Access file's Updated Date and Time and then display it in their output.
Basically, what I want to do is display for the user something that says
"Access DB version is 24 Apr 04 at 11:45".

Is it possible to get the Access file's last updated Date and Time on the
server side?
 
J

Jim Buyens

Yes. If you code:
<%
Dim fso, f, s
Set fso = Server.CreateObject_
("Scripting.FileSystemObject")
Set f = fso.GetFile(server.mappath("fpdb/mydb.mdb"))
%>
then
<%=f.DateLastModified%>
will display the filesystem data for your Acccess
database.

For more info on the Scripting.FileSystemObject, browse
http://msdn.microsoft.com/library/en-
us/script56/html/fsooriscriptingrun-timereference.asp

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top