fso| Tutorial | Is there
How to use the FSO to determine if a file exists-fso use tutorial 8
There are WriteLine and write two ways to write data to a file, which is described in detail in the following two ways of using:
Viii. How to use the FSO to determine whether a file exists:
Method: FileExists
Call Format: (right file exists, then return x equals True, otherwise equal to false)
X = FileSystemObject name. FileExists (filename)
SOURCE Example: (check to see if File1.txt exists in the same directory as the ASP file)
<%
'=================================================
' Author: Arisisi
' URL: http://www.alixixi.com/
' Source: FSO to determine whether there are examples of files
' Time: December 17, 2005
'=================================================
Set fs = Server.CreateObject ("Scripting.FileSystemObject")
File = Server.MapPath ("File1.txt")
If FS. FileExists (file) Then ' Determine if File1.txt file exists
Response.Write File & "files exist"
Else
Response.Write File & "Files do not exist"
End If
%>