Home | Javascript validator | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.
Microsoft® JScript®
ShareName Property
 Scripting Run-Time Reference 
Version 3 

See Also                  Applies To


Description
Returns the network share name for a specified drive.
Syntax
object.ShareName

The object is always a Drive object.

Remarks
If object is not a network drive, the ShareName property returns a zero-length string ("").

The following code illustrates the use of the ShareName property:

function ShowDriveInfo(drvpath)
{
  var fso, d, s;
  fso = new ActiveXObject("Scripting.FileSystemObject");
  d = fso.GetDrive(fso.GetDriveName(fso.GetAbsolutePathName(drvpath)));
  s = "Drive " + d.DriveLetter + ": - " + d.ShareName;
  return(s);
}

Home | Javascript validator | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.

R7