Skip to main content

FileSystemObject.GetParentFolderName method

Table of contents
  1. Syntax
  2. Remarks

Returns a string containing the name of the parent folder of the last component in a specified path.


object.GetParentFolderName (path)

The GetParentFolderName method syntax has these parts:

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


The GetParentFolderName method returns a zero-length string ("") if there is no parent folder for the component specified in 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>