Skip to main content

FileSystemObject.GetDriveName method

Table of contents
  1. Syntax
  2. Remarks

Returns a string containing the name of the drive for a specified path.

Syntax

object.GetDriveName (path)

The GetDriveName method syntax has these parts:

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

Remarks

The GetDriveName method returns a zero-length string ("") if the drive can't be determined.

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>