Esto te puede servir?
Código:
<html>
<head>
<title> Mostrar Archivo </title>
<script language="JavaScript">
<!--
function checkForm(){
if (document.forms[0].arch.value == ""){
alert("Seleccione un archivo");
return false;
}
bet1=document.forms[0].arch.value.lastIndexOf('\\')+1;
bet2=document.forms[0].arch.value.indexOf('html') + 4;
pagi=document.forms[0].arch.value.substring(bet1,bet2);
}
//-->
</script>
</head>
<body>
<form method=post action="">
<input type="file" name="arch"> <br><br>
<input type="button" value="Ver Archivo" onClick="checkForm();">
</form>
</body>
</html>
<hr noshade size=1><img src="http://www.gograph.com/Images-8712/ClipArt/cat03.gif" height="50" border=0 align="absmiddle"> <font size="2" face="verdana" color="#000000">
bet[/CODE]