<html>
<body>
<script language="vbscript" >
Function LF_TEST()
filepath = document.all.testwg.value
msgbox filepath
set fso = createobject("Scripting.FileSystemObject")
if(filepath <> "") then
if(fso.FileExists(filepath)) then
msgbox("right")
else
msgbox("wrong")
end if
end if
end function
</script>
<input type="file" name="testwg">
<input type="button" name="test" onclick="LF_TEST()">
</body>
</html>