<%@ 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 %> <% end if %>