DIAdem Help

Method: GetExtensionName for FileSystemObject

  • Updated2024-09-12
  • 1 minute(s) read

Method: GetExtensionName for FileSystemObject

Returns the part of the path that corresponds with the filename extension of a file.

sGetExtensionName = Object.GetExtensionName(Path)
ObjectFileSystemObject
Object with this method
PathString
Specifies the path. The path must not correspond with an existing file.
sGetExtensionNameString
Receives the filename extension.

The following example specifies the filename extension in a path:

Function GetExtension(sDrive)
  Dim fso
  Set fso = CreateObject("Scripting.FileSystemObject")
  GetExtension = fso.GetExtensionName(sDrive)
End Function

Log in to get a better experience