View Full Version : Windows IIS ASP help
Can ASP detect if a physical file is missing in the local drive (easily)?
In a way, this would work. Err.Number = 0 means the file is there.
<%
Set fso = CreateObject("Scripting.FileSystemObject")
on error resume next
Set f2 = fso.GetFile("C:\test2.img")
response.write "Error Number=" & Err.Number
%>
EDIT: Oh, this is easier:
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.FileExists(Server.MapPath("C:\testfile.img")) then Response.write "The file is there."
set fso = nothing
Now, anyone know how to verify if a HTTP link is valid?
Dr. Death
03-12-2009, 10:11 PM
http://www.devx.com/vb2themax/Tip/18670
Try there?
Wow, nice! That's really simple using a Lib call.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.