home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 February
/
CHIP_2_98.iso
/
software
/
pelne
/
optionp
/
iis4_03.cab
/
iichkpath.asp
< prev
next >
Wrap
Text File
|
1997-11-12
|
902b
|
41 lines
<%@ LANGUAGE=VBScript %>
<% Option Explicit %>
<% Response.Expires = 0 %>
<%
Const L_THEFILE_TEXT = "The file "
Const L_THEPATH_TEXT = "The path "
Const L_NOTEXIST_TEXT = " does not exist."
Const L_ENTERFILENAME_TEXT = "Please enter a valid file name."
Const DIR = "0"
Const FILE = "1"
Dim path, ptype, failed, FileSystem, errmsg
path=Request.QueryString("path")
ptype=Request.QueryString("ptype")
failed = false
Set FileSystem=CreateObject("Scripting.FileSystemObject")
if ptype = FILE then
failed = not FileSystem.FileExists(path)
errmsg = L_THEFILE_TEXT & replace(path,"\","\\") & L_NOTEXIST_TEXT
else
failed = not FileSystem.FolderExists(path)
errmsg = L_THEPATH_TEXT & replace(path,"\","\\") & L_NOTEXIST_TEXT
end if
%>
<% if failed then %>
<SCRIPT LANGUAGE="JavaScript">
alert("<%= errmsg %>");
</SCRIPT>
<% end if %>
<HTML>
</HTML>