August 1999
Intermediate to advanced
1488 pages
72h 53m
English
filesystemobject.GetBaseName(path)
path Required parameter specifying 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.
Listing 9.82 shows how the GetBaseName() method is used.
<html> <body> <script language="JScript"> <!-- Hide // function gets the Base name of the FileSystemObject function get() { var myObject, b; // Create an instance of the FileSystemObject myObject = new ActiveXObject("Scripting.FileSystemObject"); // Gets the specified base name b = myObject.GetBaseName("c:\\tmp\\myTest.txt"); alert("The base ... |
Read now
Unlock full access