August 1999
Intermediate to advanced
1488 pages
72h 53m
English
file.ShortPath
The ShortPath property returns the short path used by programs that require the earlier 8.3 naming convention.
Listing 9.63 shows how to get the short path for the specified file.
<html>
<BODY>
<script language="JScript">
<!-- Hide
// function gets the shortpath of the file object.
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 ShortPath name is: " + f.ShortPath);
}
//-->
</script>
<form name="myForm">
<INPUT type="Button" value="Get Shortpath" onClick='get()'>
</form> </BODY> </html> ... |
Read now
Unlock full access