Syntax
filesystemobject.GetBaseName(path)
path specifies the component whose base name is to be returned.
The GetBaseName() method returns a string containing the base name of a file or folder, without any extension or path.
<html>
<body>
<script language="JScript">
<!--
function get()
{
var myObject, b;
myObject = new ActiveXObject("Scripting.FileSystemObject");
b = myObject.GetBaseName("c:\\tmp\\myTest.txt");
alert("The base name is: " + b);
}
-->
</script>
<form name="myForm">
<input type="Button" value="Get Base" onClick='get()'>
</form>
</body>
</html>