Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check if file is avaliable on server

Status
Not open for further replies.

Kindi

Programmer
Jan 31, 2001
54
GB
With the File System Object in ASP, is it possible to check if a certain file is avaliable on the server?

If yes, how do i implement this?

Thanks
 
I dont think you need to use the FSO. I would use
%>
If Server.MapPath(&quot;FileName&quot;) <> &quot;&quot; Then
'FileExists
Else
'File Doesn't Exist
End If
%>


Hope this helps.

G -GTM Solutions, Home of USITE-
-=
 
There is a way to do it in FSO if you really want to. But the above code will work just fine.

<%
If object.FileExists(file) Then
'FileExists
Else
'NoFile
EndIf
%>

Hope that helps.
Donn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top