Skip to main content

FileSystemObject.GetBaseName method

Table of contents
  1. Syntax
  2. Remarks

Returns a string containing the base name of the last component, less any file extension, in a path.

Syntax

object.GetBaseName (path)

The GetBaseName method syntax has these parts:

Part Description
object Required. Always the name of a FileSystemObject.
path Required. The path specification for the component whose base name is to be returned.

Remarks

The GetBaseName method returns a zero-length string ("") if no component matches the path argument.

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>