ASP to determine file fileexists, folder folderexists, letter driveexists whether there is
, disk character driveexists
<%
Set fs=server.createobject ("Scripting.FileSystemObject")
If Fs.driveexists ("c:") = True Then
Response.Write ("Drive c:exists.")
Else
Response.Write ("Drive c:does not exist.")
End If
Response.Write ("<br/>")
If Fs.driveexists ("G:") = True Then
Response.Write ("Drive g:exists.")
Else
Response.Write ("Drive g:does not exist.")
End If
Set fs=nothing
%>
ASP folder folderexists
<%
Set fs=server.createobject ("Scripting.FileSystemObject")
If FS. FolderExists ("c:temp") = True Then
Response.Write ("Folder C:temp exists.")
Else
Response.Write ("folder C:temp does not exist.")
End If
Set fs=nothing
%>
ASP judgment File FileExists
<%
Set fs=server.createobject ("Scripting.FileSystemObject")
If (fs. FileExists ("C:winntcursors3dgarro.cur")) =true Then
Response.Write ("File c:winntcursors3dgarro.cur exists.")
Else
Response.Write ("File c:winntcursors3dgarro.cur does not exist.")
End If
Set fs=nothing
%>