Padding Padding
Janet
Systems
 Register  Login 
Telephone  01628 566 178
Website Design, Hosting and Software Services
  Search 
Padding
corner Padding corner
Padding Padding
corner Padding corner
 ASP Articles

The code presented below is an example of testing whether a file exists on the server.

<%

if doesFileExist("myfilename") = true then
    response.write("The file " & myfilename & " exists.")
else
    response.write("The file " & myfilename & " does not exists")
end if

Function doesFileExist (filename)
    Dim fs
    Set fs=Server.CreateObject("Scripting.FileSystemObject")
    doesFileExist = false
    if fs.FileExists(Server.Mappath(fileName)) Then doesFileExist = true
    Set fs = Nothing
End Function

%>

NAT July 2005 (Revised)


This article viewed: 1168 times Back

Copyright © 2004-2007 Janet Systems Ltd.

 Print   

DotNetNuke Website design and hosting from £15.00 per month. More...

Looking for a website design company in the Thames Valley, call us on 01628 566178

DotNetNuke Modules
DotNetNuke Modules availalble from Janet Systems

DotNetNuke Skins
DotNetNukeSkins.gif

from Janet Systems

Padding
Copyright 2002-2008 Janet Systems Ltd.   Terms Of Use  Privacy Statement Tuesday, May 13, 2008