<html>
<body>
<script language="JScript">
<!--
function get()
{
var myObject, f;
myObject = new ActiveXObject("Scripting.FileSystemObject");
f = myObject.GetFile("c:\\yourfolder\\test.txt");
alert("The file ShortName is: " + f.ShortName);
}
//-->
</script>
<form name="myForm">
<input type="Button" value="Get Shortname" onClick='get()'>
</form>
</body>
</html>
|