System.Shell.itemFromPath method
[ The Windows Gadget Platform/Sidebar is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. ]
Retrieves a System.Shell.Item that represents an object at the specified Universal Naming Convention (UNC) path.
Syntax
objRetVal = System.Shell.itemFromPath(
strPath
)
Parameters
-
strPath [in]
-
String that specifies the UNC path.
Return value
System.Shell.Item that represents the object at the specified UNC location, or null if the item cannot be determined.
Examples
The following example demonstrates how to obtain a System.Shell.Item based on its UNC location.
// --------------------------------------------------------------------
// Display the name of an object obtained from the UNC path.
// --------------------------------------------------------------------
function GetItemFromPath()
{
var oItem = System.Shell.itemFromPath(System.Gadget.path + "\\test.txt");
spFeedback.innerHTML = oItem.name + "<br/>";
}
Requirements
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |
End of client support |
Windows 7 |
End of server support |
Windows Server 2008 |
IDL |
|
DLL |
|