DIAdem Help

Method: GetBaseName for FileSystemObject

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

Method: GetBaseName for FileSystemObject

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

sGetBaseName = Object.GetBaseName(Path)
ObjectFileSystemObject
Object with this method
PathString
Specifies the path. The path must not correspond with an existing file.
sGetBaseNameString
Receives the filename.

The following example specifies the filename in a path:

Function GetName(sFile)
   Dim fso
   Set fso = CreateObject("Scripting.FileSystemObject")
   GetName = fso.GetBaseName(sFile)
End Function

See Also

Objects Overview

Log in to get a better experience