<html>
<body>
<script language="JScript">
<!--
function get(){
var myObject = new ActiveXObject("Scripting.FileSystemObject");
var myFolder = myObject.GetFolder("c:\\Program Files");
alert (myFolder.ShortPath);
}
// End hide-->
</script>
Get the short path of the "c:\\Program Files" folder.
<form name="myForm">
<input type="Button" value="Get Short Path" onClick='get()'>
</form>
</body>
</html>
|