Tuesday, September 9, 2008

ASP Tutorial : File Exists or Not?

VB Script code to find out whether a file exists in the Drive or not ?

< %
Set fs=Server.CreateObject("Scripting.FileSystemObject") 
If (fs.FileExists("c:\abc.doc"))=true Then
Response.Write("File abc.doc exists.")
Else
Response.Write("Sorry. abc.doc does not exist.")
End If
%>

No comments:

 
Disclaimer and Copyright