GetBaseName 方法 |
|
GetBaseName 方法的语法有以下部分:
部分 | 描述 |
object | 必选。应为 FileSystemObject 的名称。 |
path | 必选。指定文件或文件夹的路径,要返回其组成部分的基本名。 |
下面例子举例说明如何使用 GetBaseName 方法:
Function GetTheBase(filespec) Dim fso Set fso = CreateObject("Scripting.FileSystemObject") GetTheBase = fso.GetBaseName(filespec) End Function
注意 GetBaseName 方法仅应用于提供的 path 字符串。该方法不会辨识路径,也不检测路径是否存在。 | |