Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Returns the extension (for example "txt" or "exe") of the last component in a path.
Syntax
object.GetExtensionName(path)
Arguments
object
Required. Always the name of a FileSystemObject.path
Required. The path of the component whose extension is to be returned.
Remarks
For network drives, the root directory (\) is considered to be a component.
This method returns an empty string ("") if the file doe not exist.
The following example illustrates the use of the GetExtensionName method.
Function GetAnExtension(DriveSpec)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
GetAnExtension = fso.GetExtensionName(Drivespec)
End Function