<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 ShortPath name is: " + f.ShortPath);
}
//-->
</script>
<form name="myForm">
<INPUT type="Button" value="Get Shortpath" onClick='get()'>
</form>
</BODY>
</html>
|