August 1999
Intermediate to advanced
1488 pages
72h 53m
English
file.ShortName
The ShortName property returns the short name used by programs that require the earlier 8.3 naming convention.
Listing 9.62 shows how to access the short name of the file.
<html>
<body>
<script language="JScript">
<!-- Hide
// function gets the shortname for the file.
function get()
{
var myObject, f;
// Create an instance of the FileSystemObject
myObject = new ActiveXObject("Scripting.FileSystemObject");
f = myObject.GetFile("c:\\tmp\\myTest.txt");
alert("The file ShortName is: " + f.ShortName);
}
//-->
</script>
<form name="myForm">
<input type="Button" value="Get Shortname" onClick='get()'>
</form>
</body>
</html>
|
Read now
Unlock full access