For a guide to the choosing ASP or PHP, click here
Home >> Text Files >> Check if a File Exists This code shows how to check to see if a filename already exists
<% ' declare our variables dim fso dim ourFile dim ourResult ' this is the file we want to check ourFile = "Filename.txt" 'check for the file Set fso = Server.CreateObject("Scripting.FileSystemObject") if (fso.FileExists(ourFile) = True) then ourResult = "Yes" else ourResult = "No" end if ' clean up the resources Set fso = nothing ' The variable ourResult is either Yes or No, ' depending on the existence of the file %> What is ASP?
What is PHP?