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