Javascript FSO GetAbsolutePathName Method
GetAbsolutePathName method of Javascript FileSystemObject (FSO) provides the functionality to get or map the absolute path for the specified file or folder. FSO GetAbsolutePathName method returns the canonical representation of the path for the specified file or folder. This method maps the specified file with current path of the FileSystemObject at client side. GetAbsolutePathName method generates the complete path for the specified file or folder.
Syntax for Javascript FSO GetAbsolutePathName Method
fso.GetAbsolutePathName( path );
As shown in the above syntax of GetAbsolutePathName method, it accepts only one parameter as path for any file or folder.
Example of FSO GetAbsolutePathName Method
Following are the example of different types of path mapping using GetAbsolutePathName method:
<script type="text/javascript">
// initialize ActiveXObject and create an object of Scripting.FileSystemObject.
var fso = new ActiveXObject("Scripting.FileSystemObject");
var fPath = fso.GetAbsolutePathName(".");
document.write(fPath);
document.write("<br />");
fPath = fso.GetAbsolutePathName("/");
document.write(fPath);
document.write("<br />");
fPath = fso.GetAbsolutePathName("/Temp");
document.write(fPath);
document.write("<br />");
fso = null;
// Output:
// C:\Documents and Settings\Administrator\Desktop
// C:\
// C:\Temp
</script>
Continue to next tutorial: Javascript FSO GetBaseName Method to learn how to get the base name of the specified file or folder.

* will not be published
* hint: http://www.example.com