Skip to main content

FileSystemObject.GetExtensionName method

Table of contents
  1. Syntax
  2. Remarks

Returns a string containing the extension name for the last component in a path.


object.GetExtensionName (path)

The GetExtensionName method syntax has these parts:

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


For network drives, the root directory (****) is considered to be a component.

The GetExtensionName 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>